Would anyone happen to know how to use the tee command?

I have written a shell script call mailfile and I was trying to do something
like this:


tail -f /var/log/syslog | grep "foobar" > foobar.txt | mailfile foobar.txt
[EMAIL PROTECTED]

however that doesn't work like I thought it would.  I looked up tee and it
says that it redirects STDIN to STDOUT so I was thinking that maybe I could
use tee in this command, but possible what I'm trying to do isn't quite
possible.

Reply via email to