Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running such script to transcode my audio files:


for a in *$fmt; do 
$vlc -I dummy -vvv "$a" --sout "#transcode{acodec=$acodec,ab=$arate,channels=2}:duplicate{dst=std{access=file,mux=ogg,dst=\"$a.$ext\"}" vlc://quit 

And trying to redirect this script output to file like this:

./ > /media/sf_Downloads/transcode.log

But receive only 0 byte file. Why?

share|improve this question
up vote 0 down vote accepted

VLC is writing to stderr and not stdout. You can mend this in your log redirection by calling the script like:

./ > /media/sf_Downloads/transcode.log 2>&1

or in the Bash specific way:

./ &> /media/sf_Downloads/transcode.log

You can also do the redirection to stdout within the script by adding 2>&1 at the end of the line with the VLC command within the loop. Then you can call the script just as you tried before:

./ > /media/sf_Downloads/transcode.log

and get the intended logging result directly.

For more information, see e.g.

share|improve this answer
Thanks, it helped! – Suncatcher Mar 12 '14 at 17:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.