RE: Madplay capture output to file - how to?

"Gurpal S. Bhachu" <[email protected]> Thu, 21 Aug 2003 00:04:03 +0100
Newsgroups gmane.comp.audio.mad.user
Message-ID <000601c3676f$5ac003f0$0a00a8c0@p3>
Thank you so much Ian, Rob L, Rob K - that's wat I was looking for "2>".
My unix skills a bit weak. Cheers..

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Ian Scott
> Sent: 19 August 2003 03:25
> To: Gurpal S. Bhachu
> Cc: [email protected]
> Subject: Re: [mad-user] Madplay capture output to file - how to?
> 
> 
> On Mon, Aug 18, 2003 at 11:38:27PM +0100, Gurpal S. Bhachu wrote:
> > Hi,
> > 
> > I wish to capture the output of madplay to an external file eg:
> > 
> > $ madplay abc.mp3 -o abc.wav > abc.txt
> > 
> > It seems that abc.txt contains nothing! Is there some weird non 
> > standard out thing happening here? Please could someone 
> advise how to 
> > do this...
> 
> madplay is outputting on stderr instead of stdout.  You can 
> redirect stderr to stdout with the directive '2>&1', so: $ 
> madplay abc.mp3 -o abc.wav 2>&1 > abc.txt 
> will work.
> Or you can direct stderr directly to abc.txt:
> $ madplay abc.mp3 -o abc.wav 2>abc.txt
> 
> This is quite useful for other console programs that output on stderr.
> 
> Ian
>