Respostas:
awk
$ some-command | awk '{print "Hi "$1" Bye"}'
sed
$ some-command | sed 's/\(.*\)/Hi \1 Bye/'
Usando awk
:
$ echo -e "John\nBob\nLucy" | awk '{print "Hi "$1" Bye"}'
Hi John Bye
Hi Bob Bye
Hi Lucy Bye
Usando sed
:
$ echo -e "John\nBob\nLucy" | sed 's/\(.*\)/Hi \1 Bye/'
Hi John Bye
Hi Bob Bye
Hi Lucy Bye
paste
forma como hoje, graças 8-)
some-command | paste -d\ <(printf '%s\n' Hi Hi Hi) - <(printf '%s\n' why Why WHY??)