I'm running this line on my shell scriptsudo npm install -g yaml-cli -y 2>&1 >/dev/nullI would expect to get no output, but I still getnpm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
Suppress output of shell script
shell script
Redirections are evaluated from left to right, you have got this other way around. Just swap the redirections:sudo npm install -g yaml-cli -y >/dev/null 2>&1In sudo npm install -g yaml-cli -y 2>&1 >/dev/null:First, for 2>&1, the STDERR (FD 2) is being sent to the terminal (precisely, where the STDOUT (FD 1) is currently attached to, presumably terminal), so the errors are being shownThen, for >/dev/null, the STDOUT is being sent to /dev/null, this happens later