LonelyStar Guru
Joined: 06 Dec 2005 Posts: 390
|
Posted: Wed Feb 27, 2008 11:29 pm Post subject: Redirecting stdout into several programs |
|
|
Hi,
I want to write a bash script wich analyzes an email, it gets from stdin using the mess822 packet.
I want to extract the from and the to field.
I can extract the from field like this:
from_line=`822field from`
Which takes stdin and extracts the from field.
Can do the same with the to field, but how can I do both? After the line above, there is no stdin left for
to_line=`822field to`
to analyze. How can I pipe stdin into both comands?
Thanks!
Nathan |
|