FahamLah

Commands

echo $?

echo $?

Risk: Safe

What it does

Shows the exit code of the last command.

When to use it

When you are not sure a command worked.

Example

$ echo $?

0 means all good. Anything else means trouble.