How to hide terminal command output messages under ubuntu / debian linux

There are times when we do not want our scripts or programs to outputy any kind of message to the standard output – like for instance if we have multiple scripts in our crontabs. If you didn’t have your crontab configured in such a way that it automatically shoots you an email if something is shown on one of its outputs, but you indeed have at least some kind of a function implemented within your script to alert you in one for of another, than silencing the output is somewhat sensible.

Either way, to employ a pseudo force silent mode run your scripts/programs like this:

/path/to/my_script.sh 2&>1

Remember to only hide the output if you are definately sure thar you don’t need to see it!


Thanks for reading! Please consider Buying me a Coffee or checking out Colibri!