2026-08-26 07:41 UTC
Tip for Linux shell beginners: Execute a second command only if the first one was successful.
`command_1 && command 2`
Background: This compound command uses the result code returned by `command_1` with the "shortcircuit" behaviour of the "logical AND" `&&` operator.
Replies (1)
-
@dazo@infosec.exchange 2026-08-26 07:51
@monospace@floss.social And || does the opposite, runs command2 if command1 failed.