CompTIA
LX0-102 · Question #255
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
(56 responses)- A75% (42)
- B13% (7)
- C7% (4)
- D4% (2)
- E2% (1)
Community Discussion
No community discussion yet for this question.