How to check if the last command was successful in Unix?

echo $?

Related Questions

Category: UNIX Interview Questions.