'> /dev/null'
is very common syntax and that's something that is not a new concept; but, I have came to this scripting and couldn't figure the logic behind '< /dev/null'
especially with FFMpeg.
I wrote dozens of scripts that handles FFMpeg, and I found that in order for script itself to successfully call and execute FFMpeg on its own, adding '< /dev/null
' at end of command line of ffmpeg. For example:
ffmpeg -i $INPUT -c:v copy -c:a copy output.mp4 < /dev/null
But if I didn't add that sytnax at end of the command, script couldn't "push" the execution over to FFMpeg. I understood the whole concept when it comes to "write" as >
for all null, stdout, stdin, but... read
by null ? scratching on head
So, what is < /dev/null
exactly?