Multiple choice technology operating systems

Which variable contains the return value of last executed command

  1. $!
  2. $?
  3. $#
  4. $@
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The $? variable holds the exit status of the last executed command, where 0 means success and non-zero means error. $! is PID of last background command, $# is argument count, $@ is all arguments.