How to retrieve the first word of the output of a command in bash?
Posted
by Neuquino
on Stack Overflow
See other posts from Stack Overflow
or by Neuquino
Published on 2010-03-13T23:09:16Z
Indexed on
2010/03/13
23:15 UTC
Read the original article
Hit count: 248
bash
I have a command, for example: echo "word1 word2". I want to put a pipe (|) and get word1 from the command.
echo "word1 word2" | ....
I don't know what to put after the pipe...
Thanks in advance
© Stack Overflow or respective owner