1752557 Members
4623 Online
108788 Solutions
New Discussion юеВ

Re: Tee

 
Daniel Ubeda
Frequent Advisor

Tee

I want to send the output from a command, to two devices or to one device(/dev/rmt/0m) and one file.

Someone can help me ?
Daniel
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Tee

Hi:

This should work:

command | tee devicename > filename

Command's stdout will be directed to both devicename and filename.


Man tee for details.

If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: Tee

Hi Daniel,

like clay suggested, you can use the syntax with the filename and devicename interchanged too,

command |tee filename > devicename

Hope this helps.

Regds
Elizabeth_2
Valued Contributor

Re: Tee


Hi Daniel,

I third that vote. :0) tee(1) transcribes the standard input to the standard output and makes copies in the files. The tee command will return a zero upon successful completion, or nonzero if the command fails.

Elizabeth
Ravi_8
Honored Contributor

Re: Tee

Hi,

#command | tee device > filename
never give up