The error message always gets printed to the terminal whenever I get an error in bash shell (e.g. poor syntax)
$ totem Desktop/songs/song1.mp3
** Message: Error: Resource not found.
gstfilesrc.c(1055): gst_file_src_start (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/GstFileSrc:source:
No such file "/home/me/Desktop/songs/song1.mp3"
So what is the purpose of redirecting stderr to stdout if stderr gets printed to terminal by default?
$ command-name 2>&1
By default, both
stdoutandstderrare directed to the terminal. If you redirectstderrtostdout, then it also goes to the terminal.If you want to get rid of the stderr output, redirect it to the void: