nerdexam
CompTIA

LX0-101 · Question #130

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

(18 responses)
  • A
    72% (13)
  • B
    6% (1)
  • C
    17% (3)
  • D
    6% (1)

Community Discussion

No community discussion yet for this question.

Full LX0-101 Practice