nerdexam
LPI

102-400 · Question #123

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

(48 responses)
  • A
    75% (36)
  • B
    2% (1)
  • C
    13% (6)
  • D
    2% (1)
  • E
    8% (4)

Community Discussion

No community discussion yet for this question.

Full 102-400 Practice