Monday 19 June 2017

CompTIA LX0-104 Question Answer

What output will the following command sequence produce?
echo '1 2 3 4 5 6' | while read a b c; do echo result: $c $b $a; done


A. result: 3 4 5 6 2 1
B. result: 1 2 3 4 5 6
C. result: 6 5 4
D. result: 6 5 4 3 2 1
E. result: 3 2 1

Answer: A


When the command echo $? outputs 1, which of the following statements are true?

A. It is the process ID of the echo command.
B. It is the process ID of the current shell.
C. It is the exit value of the command executed immediately before echo.
D. It is the exit value of the echo command.

Answer: C

No comments:

Post a Comment

Note: only a member of this blog may post a comment.