Here strings
suggest changeYou can feed a command using here strings like this:
$ awk '{print $2}' <<< "hello world - how are you?" world $ awk '{print $1}' <<< "hello how are you > she is fine" hello she
You can also feed a while
loop with a here string:
$ while IFS=" " read -r word1 word2 rest > do > echo "$word1" > done <<< "hello how are you - i am fine" hello
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents