awk
$ some-command | awk '{print "Hi "$1" Bye"}'
sed
$ some-command | sed 's/\(.*\)/Hi Bye/'
Exemplos
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 Bye/'
Hi John Bye
Hi Bob Bye
Hi Lucy Bye