Correct Answer: B ☜ is correct.
What does the 'echo $?' command do?
It shows the most recently exit code.
The command's exit code right before you entered 'echo $?'.
Examples:
true
echo $?
0
false
echo $?
1
ls -fasjfhslakfjh
echo $?
2
(The two here represents "Misuse of Shell Built-in")
See more:
https://www.baeldung.com/linux/status-codes
https://unix.stackexchange.com/questions/501128/what-does-echo-do
B is correct. To test, type a common command and then echo $? and check the output, then type some gibberish and do echo $? and check the output again. it shoudl display the exit code depending on the previous command
upvoted 4 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
CuriousLinuxCat
Highly Voted 4 months, 3 weeks agoiwkno6
Most Recent 4 months ago