Multiple choice technology

Command to verify the previous command execution status

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

$? stores the exit status of the most recently executed command. A value of 0 indicates success, while non-zero values indicate various error conditions. $$ gives the current shell's PID, $! gives the last background job's PID, and $# gives the argument count.