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: mad-user-admin@lists.mars.org [mailto:mad-user-admin@lists.mars.org] On Behalf Of Ian Scott Sent: 19 August 2003 03:25 To: Gurpal S. Bhachu Cc: mad-user@lists.mars.org 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