Silence Result of Command
When you want to silence the result of a command in a Unix-like shell environment, you can use the > /dev/null
or 2> /dev/null
redirection techniques, depending on whether you want to suppress standard output (stdout) or standard error (stderr) respectively. Here’s how you can use them:
-
To silence standard output (stdout) of a command, use
> /dev/null
:1
command > /dev/null
This will discard the normal output of the command.