Bash Scripting - Error Handling
You want to run two commands in a script:
cmd1 and cmd2. You want to run cmd2 only if cmd1 succeeded (exit code 0). Which is the best way to do this?