Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] stdout redirection
- Date: Wed, 7 Mar 2007 09:58:50 +0900 (JST)
- From: Curt Sampson <cjs@??>
- Subject: Re: [tlug] stdout redirection
- References: <a96ae3bb0703012118l58e05306t9470ac9ec4d96dc0@example.com> <20070302054755.GB29992@example.com> <20070302060525.GC29992@example.com>
On Fri, 2 Mar 2007, Chris BALUTA wrote:
I forgot to add: ./myprog 2> error.log | tee out.file
Though if you want both stderr & stdout to be dumped both to the screen and to the two files, I can't help you: The above will dump stdout to the screen and to out.file and it will dump stderr to error.log. But you won't get stderr on the screen.
You need to set stdout to the appropriate place, and then set stderr to go to the same place as stdout:
./myprog 2>&1 | tee out.file
or
./myprog >logfile 2>&1
Remember to redirect stdout first, in most cases, this will send stderr to stdout, then stdout to logfile, but leave stderr going to the console:
./myprog 2>&1 >logfile
cjs -- Curt Sampson <cjs@??> +81 90 7737 2974
- References:
- [tlug] stdout redirection
- From: Hector Akamine
- Re: [tlug] stdout redirection
- From: Chris BALUTA
- Re: [tlug] stdout redirection
- From: Chris BALUTA
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] (OT) Reverse DNS resolution blues- ISP recommendations?
- Next by Date: Re: [tlug] Fully DHCP router? (Maybe OT)
- Previous by thread: Re: [tlug] stdout redirection
- Next by thread: [tlug] Dependancy hell
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links