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