nerdexam
LPI

117-102 · Question #362

Which of the following commands 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 of the following commands 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

(32 responses)
  • A
    78% (25)
  • B
    6% (2)
  • C
    3% (1)
  • D
    13% (4)

Community Discussion

No community discussion yet for this question.

Full 117-102 Practice