RE: appending both stderr and stdout to a single file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tee may be your answer.

process 2>&1 | tee -a logfile

That will redirect stderr to stdout.  Then it will pipe stdout through
tee.  tee will append the output to a file and stdout.

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of mark
Sent: Thursday, March 08, 2007 8:31 AM
To: General Red Hat Linux discussion list
Subject: Re: appending both stderr and stdout to a single file

Marq wrote:
> 
> ls >> dirlist 2>>&1
> 
> this will redirect stdout first and then the stderr
> 
> but i need to redirect the both output as it appear in the screen
(with out
> redirection)

Not sure if tee will support stderr, but you *could*
process >> rpt 2>>&1 &
tail -f rpt

	mark

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux