Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam LFCS Topic 1 Question 95 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 95
Topic #: 1
[All LFCS Questions]

What is the output of the following command?

for token in a b c; do

echo -n ${token};

done

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Cletus
6 days ago
Haha, this is a classic shell question! The answer is definitely B) abc. I could do this in my sleep. Or maybe I should just take a nap during the exam instead?
upvoted 0 times
...
Aaron
12 days ago
I'm not sure, but I think the output might be option E) a b c because the command will echo each token with a space in between.
upvoted 0 times
...
Alberta
14 days ago
E) a b c is my guess. It's simple and straightforward, just like the command. Although, maybe the exam writers are trying to trick us. Who knows?
upvoted 0 times
...
Karl
17 days ago
I agree with Linn, the output should be abc because the command will echo each token without any spaces.
upvoted 0 times
...
Linn
17 days ago
I think the output is option B) abc.
upvoted 0 times
...
Martina
22 days ago
D) {a},{b},{c}, looks like it could be the output, but I'm not convinced. This exam is really testing our shell knowledge, isn't it?
upvoted 0 times
Naomi
6 days ago
E) a b c
upvoted 0 times
...
Marnie
9 days ago
C) $token$token$token
upvoted 0 times
...
Larue
11 days ago
B) abc
upvoted 0 times
...
Ming
12 days ago
A) anbncn
upvoted 0 times
...
...
Tomas
28 days ago
Easy peasy, the answer is B) abc. I learned this back in my shell scripting days. Hey, at least it's not a coding question, right?
upvoted 0 times
...
Rosio
1 months ago
Hmm, I'm not sure about this one. I'm going to go with C) $token$token$token. Seems like it might be a trick question.
upvoted 0 times
Jeffrey
9 days ago
I agree, it should be B) abc.
upvoted 0 times
...
Altha
10 days ago
I think the correct answer is B) abc.
upvoted 0 times
...
...
Novella
1 months ago
The correct answer is B) abc. The command simply prints out each token in the for loop, which results in the output abc.
upvoted 0 times
Arthur
12 days ago
Correct!
upvoted 0 times
...
Fletcher
20 days ago
B) abc
upvoted 0 times
...
...

Save Cancel