command || echo 'command failed'
Category: Bash Scripting
command || echo 'command failed'
Short-circuit OR: run second command only if first fails
Short-circuit OR: run the second command only if the first fails. Like 'try A, if it fails then do B'.