appending both stderr and stdout to a single file
Olt, Joseph
jolt at ti.com
Thu Mar 8 13:35:41 UTC 2007
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 at redhat.com
[mailto:redhat-list-bounces at redhat.com] 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 at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
More information about the redhat-list
mailing list