QuestionQ131

VerifiedEssential Commands

What output does the following command sequence produce?

for token in a b c; do  
echo -n "$token ";  
done  
Explanation

The loop assigns token the values a, b, and c in order. echo -n prints each value followed by a space without adding a newline, producing a b c (with a trailing space).

Community Discussion

No comments yet. Be the first to start the discussion!