Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Roberto Sanchez
Otto Wyss wrote: Ben Hutchings <[EMAIL PROTECTED]> wrote: but how can I redirect both together? cat foo 2>&1 > logfile or, to append to the file: cat foo 2>&1 >> logfile Should do it. Redirections are processed in the order they appear on the command line. So "2>&1 >logfile" redirects stderr to

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Sergio Basurto
On Wed, 10 Nov 2004 09:20:29 -0800 (PST), "Sergio Basurto" wrote: > > On Wed, 10 Nov 2004 10:03:17 -0700, Rob Sims wrote: > > > > > On Wednesday 10 November 2004 09:36 am, Otto Wyss > wrote: > > > Blake Swadling <[EMAIL PROTECTED]> wrote: > > > > > but how can I redirect both together? > > > >

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Sergio Basurto
On Wed, 10 Nov 2004 10:03:17 -0700, Rob Sims wrote: > > On Wednesday 10 November 2004 09:36 am, Otto Wyss wrote: > > Blake Swadling <[EMAIL PROTECTED]> wrote: > > > > but how can I redirect both together? > > > > > > grep 2>&1 logfile > > > > Sorry does not work, stderr comes still on the > termi

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Gregory Soyez
On Wednesday 10 November 2004 18:03, Rob Sims wrote: > > Blake Swadling <[EMAIL PROTECTED]> wrote: > > > > but how can I redirect both together? > command > logfile 2>&1 man bash has a chapter for redirection (starting at line 1426!) For example, it reports the following commands: ls > logfile 2>&

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Rob Sims
On Wednesday 10 November 2004 09:36 am, Otto Wyss wrote: > Blake Swadling <[EMAIL PROTECTED]> wrote: > > > but how can I redirect both together? > > > > grep 2>&1 logfile > > Sorry does not work, stderr comes still on the terminal. command > logfile 2>&1 -- Rob -- To UNSUBSCRIBE, email to [EMA

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Otto Wyss
Ben Hutchings <[EMAIL PROTECTED]> wrote: > >> but how can I redirect both together? > >> > >> > > cat foo 2>&1 > logfile > > or, to append to the file: > > cat foo 2>&1 >> logfile > > > > Should do it. > > Redirections are processed in the order they appear on the command line. > So "2>&1 >l

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Otto Wyss
Upayavira <[EMAIL PROTECTED]> wrote: > >but how can I redirect both together? > > > > > cat foo 2>&1 > logfile > or, to append to the file: > cat foo 2>&1 >> logfile > Sorry, does not work, both still comes on the terminal. O. Wyss -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subje

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Otto Wyss
Thomas Adam <[EMAIL PROTECTED]> wrote: > > grep 2>&1 logfile > > grep 'whatever' > ./file 2>&1 > > is what you meant. > Thanks Thomas, this works. O. Wyss -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Otto Wyss
Blake Swadling <[EMAIL PROTECTED]> wrote: > > but how can I redirect both together? > > > > grep 2>&1 logfile > Sorry does not work, stderr comes still on the terminal. O. Wyss -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: Redirecting stdout and stderr into a file

2004-11-10 Thread Ben Hutchings
Upayavira wrote: Otto Wyss wrote: Sorry I can't remember how I can redirect the stdout and stderr together into a file. I can grep > logfile grep 2> logfile but how can I redirect both together? cat foo 2>&1 > logfile or, to append to the file: cat foo 2>&1 >> logfile Should do it. Redirections

Re: Redirecting stdout and stderr into a file

2004-11-09 Thread Upayavira
Otto Wyss wrote: Sorry I can't remember how I can redirect the stdout and stderr together into a file. I can grep > logfile grep 2> logfile but how can I redirect both together? cat foo 2>&1 > logfile or, to append to the file: cat foo 2>&1 >> logfile Should do it. Regards, Upayavira -- To UNSU

Re: Redirecting stdout and stderr into a file

2004-11-09 Thread Thomas Adam
--- Blake Swadling <[EMAIL PROTECTED]> wrote: > grep 2>&1 logfile grep 'whatever' > ./file 2>&1 is what you meant. -- Thomas Adam = "The Linux Weekend Mechanic" -- http://linuxgazette.net "TAG Editor" -- http://linuxgazette.net " We'll just save up your sins, Thomas, and

Re: Redirecting stdout and stderr into a file

2004-11-09 Thread Blake Swadling
On Tue, 2004-11-09 at 23:50 +0100, Otto Wyss wrote: > Sorry I can't remember how I can redirect the stdout and stderr together > into a file. I can > > grep > logfile > grep 2> logfile > > but how can I redirect both together? > grep 2>&1 logfile Cheers Blake -- Blake Swadling Senior Softw