CompTIA
LX0-104 · Question #120
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
Sign in or unlock LX0-104 to reveal the answer and full explanation for question #120. The question stem and answer options stay visible for context.
Shells, Scripting and Data Management
Question
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
Options
- Aresult: 3 4 5 6 2 1
- Bresult: 1 2 3 4 5 6
- Cresult: 6 5 4
- Dresult: 6 5 4 3 2 1
- Eresult: 3 2 1
Unlock LX0-104 to see the answer
You've previewed enough free LX0-104 questions. Unlock LX0-104 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#shell scripting#pipelines#read command#while loops