Chaining
Chaining: Did It Work? `$?`, `$LASTEXITCODE`, `&&` and `||`.
Updated
- Did It Work? `$?`, `$LASTEXITCODE`, `&&` and `||` (Apprentice): $? says whether the last command worked, $LASTEXITCODE holds the number a program ended with (0 when it worked), && runs the next command only if the last one worked, and || runs it only if the last one failed.