'echo *' I get the following output:
file1 file2 file3 ...
What I want is to pick out the first word. How can I proceed?
Assuming that you really want the first filename and not the first word, here's a way that doesn't break on whitespace:
|show 4 more comments|
You can pipe it through awk and make it echo the first wird
or you cut the string up and select the first word:
or you pipe it thorugh sed and have it remove everything but the first word