nerdexam
LPI

102-350 · Question #9

Which command will print the exit value of the previous command to the screen in bash?

The correct answer is A. echo $? See the full explanation below for the reasoning.

Question

Which command will print the exit value of the previous command to the screen in bash?

Options

  • Aecho $?
  • Becho $#
  • Cecho $exit
  • Decho $status
  • Eecho $&

How the community answered

(26 responses)
  • A
    77% (20)
  • B
    4% (1)
  • C
    12% (3)
  • E
    8% (2)

Community Discussion

No community discussion yet for this question.

Full 102-350 Practice