$ function quietly () { $* 2> /dev/null > /dev/null; };

Suppresses all output to /dev/null. This could be expanded to check for a -l command line option to log the stderr to a file maybe -l file or -l to log to default quietly.log. I’m finding that I use it more often than one would think.

View this command to comment, vote or add to favourites
View all commands by GinoMan2440

commandlinefu.com

by David Winterbottom (codeinthehole.com)

Tags: