QuestionQ65

VerifiedEssential Commands

What output does the following command produce?

for token in a b c; do  
echo -n $\{token\};  
done  
Explanation

The for loop iterates over a, b, and c. On each iteration, ${token} expands to the current value, and echo -n prints it without a trailing newline, producing abc.

Community Discussion

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