If you need to redirect output and errors to /dev/null while using bash/sh shell scripting, you can do so by combining stderr with stdout and then redirecting the combined output to /dev/null device. This will effectively redirect any error messages to /dev/null in #Linux & #Unix. See https://www.cyberciti.biz/faq/how-to-redirect-output-and-errors-to-devnull/
Add comment