[~]$ kill %123 bash: kill: %123: no such job [~]$ kill %123 2>&1 > /dev/null bash: kill: %123: no such job
I want to disable all output during killing background jobs.
The first output is expected. However, the second output is not.
As showed in the command line, I add
2>&1 to redirect
stdout, and use
> /dev/null to redirect all output to null device. But the output is still showed on the terminal.
Thanks in advance.
The following command works as expected:
kill %123 > /dev/null 2>&1