I am trying to debug a script written for use in BASH. I am a little confused as to what the following line is doing.
ffmpeg -threads 1 -f yuv4mpegpipe -i ./tmp/dvd-slideshow_temp_3203/dvdss-pipe-3203 -target ntsc-dvd -r 29.97 -an -aspect 4:3 -s 480 -y -bf 2 -f mpeg2video ./tmp/dvd-slideshow_temp_3203/video.mpg >> /dev/null 2>&1 &
the bit that really has me confused is the last bit:
>> /dev/null 2>&1 &
I would be grateful if someone could tell me what this line is doing.
The
>>indicates that you want to redirect (append) the output of the command to something.In your case you want to append the output to
/dev/null.The next part
2>&1means that you are redirecting the standard error pipe to the standard output pipe. The final&indicates that you want to sent your command to the background.The following would do the same
2>> /dev/null 1>> /dev/null &but as you can see it’s longer and not as readable as yours.