References.. 0 = standard input ( stdin ) 1 = standard output ( stdout ) 2 = standard error ( stderr ) Hence, we can use command > output.log to print the std output stream, which is an implicit meaning of command 1>output.log Thus, the annex 2>&1 means print the std error to the same place as the std output. Moreover, the we can hide the std output from printing out by using 2>/dev/null. Thanks to: https://linuxize.com/post/bash-redirect-stderr-stdout/ Learning bash: https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial
Comments