monospace, 2 months ago Tip for Linux shell beginners: Execute a second command only if the first one failed. command_1 || command 2 Background: This compound command uses the result code returned by command_1 with the "shortcircuit" behaviour of the "logical OR" || operator. #Linux #Shell #Terminal
Tip for Linux shell beginners: Execute a second command only if the first one failed.
command_1 || command 2
Background: This compound command uses the result code returned by command_1 with the "shortcircuit" behaviour of the "logical OR" || operator.
command_1
||
#Linux #Shell #Terminal
Add comment