emanuele6 1701036609 learn No. cmd1 || { cmd2;} is not always the same as if ! cmd1; then cmd2; fi . cmd1 || printf %s\\n "$?" prints the exit status of cmd1 if cmd1 failed. if ! cmd1; then printf %s\\n "$?"; fi prints 0 if cmd1 failed. emanuele6 1701039587 forget emanuele6 1701039641 learn cmd1 || { cmd2;} is not always equivalent to if ! cmd1; then cmd2; fi . cmd1 || printf %s\\n "$?" prints the exit status of cmd1 if cmd1 fails. if ! cmd1; then printf %s\\n "$?"; fi prints 0 if cmd1 fails. emanuele6 1701039691 forget emanuele6 1701039711 learn cmd1 || { cmd2;} is not always equivalent to if ! cmd1; then cmd2; fi . cmd1 || { printf %s\\n "$?";} prints the exit status of cmd1 if cmd1 fails. if ! cmd1; then printf %s\\n "$?"; fi prints 0 if cmd1 fails.