To answer this question, let's go through each option to understand why it is correct or incorrect:
Option A) for n in one two three ; do echo -n $n ; done
- This option is incorrect because it uses the incorrect syntax for the echo
command. The correct option should use a hyphen (-n
) instead of an en dash (–n
).
Option B) `for val ; do echo -n $val ; done