Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI Exam 102-500 Topic 3 Question 72 Discussion

Actual exam question for LPI's 102-500 exam
Question #: 72
Topic #: 3
[All 102-500 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Graciela
27 days ago
Ah, the old 'read a b c' trick. Classic! I'm going with A, because who doesn't love a little reverse-order action? It's like a secret shell script handshake.
upvoted 0 times
...
Juan
29 days ago
I got this! The answer is definitely A. It's like a little dance with the variables, you know? First, you got your 'c', then your 'b', and finally your 'a'. It's like a shell script shuffle!
upvoted 0 times
...
Linsey
1 months ago
This is a tricky one! I can see the logic behind A, but I'm worried that it might not handle the case where there are fewer than three values. Maybe I should go with B instead, just to be on the safe side.
upvoted 0 times
Mitsue
2 days ago
I think B is the safest option here.
upvoted 0 times
...
...
Delila
1 months ago
Hmm, I'm not sure about this one. I was thinking it might be D, which would print all the values in reverse order. But I could be wrong, so I'll go with A just to be safe.
upvoted 0 times
Horace
12 days ago
I'm not sure either, but I'll go with A) result: 3 4 5 6 2 1
upvoted 0 times
...
Bobbye
15 days ago
I believe it's B) result: 1 2 3 4 5 6
upvoted 0 times
...
Bettina
17 days ago
I think it will be A) result: 3 4 5 6 2 1
upvoted 0 times
...
...
Ma
2 months ago
Well, this looks like a typical shell script question. I think the correct answer is A, which will print the third, second, and first values of each line. The 'read a b c' command will split the input into three variables, and we're printing them in reverse order.
upvoted 0 times
Katheryn
8 days ago
User4: That makes sense, so the output should be result: 3 4 5 6 2 1.
upvoted 0 times
...
Magda
17 days ago
User3: So, it will print them in reverse order.
upvoted 0 times
...
Werner
23 days ago
User2: Yes, the 'read a b c' command will split the input into three variables.
upvoted 0 times
...
Teresita
1 months ago
User1: I think the correct answer is A, which will print the third, second, and first values of each line.
upvoted 0 times
...
...
Billye
2 months ago
But if you look at the command sequence closely, it will output 3 4 5 6 2 1, so I still think it's A.
upvoted 0 times
...
Levi
2 months ago
I disagree, I believe the answer is B.
upvoted 0 times
...
Billye
2 months ago
I think the answer is A.
upvoted 0 times
...
Kenneth
3 months ago
But if you look closely, the command sequence reads the values in reverse order, so the answer should be A.
upvoted 0 times
...
Stefan
3 months ago
I disagree, I believe the answer is B.
upvoted 0 times
...
Kenneth
3 months ago
I think the answer is A.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77