So sox
pipes to lame
which pipes to ezstream
? How about add in a tee
somewhere to save a copy? I'm not super-familiar with the tools you're using, but tee
can "read from standard input and write to standard output and files" so it could copy one of the pipes to a file.
Something like this might work, tee
between lame & ezstream:
/usr/bin/sox -t ossdsp -s -r 44100 -c 2 /dev/dsp1 -t raw - | \ /usr/bin/lame -r -a -m mono -b 24 --cbr --resample 22500 --lowpass 4 - - 2> /tmp/status.lame \ | tee outputfile-lame | \ /usr/bin/ezstream -qvc ezstream-config.xml