0

我想知道如何抑制以下输出。

commands will be executed using /bin/ksh
job ##########.a at Mon Mar ## ##:##:## 2014

使用“at -k”命令时。我试过像这样使用它

at -k "now + 5 hours" <<! >/dev/null
something
!

但我不断得到输出。有什么建议么?

4

1 回答 1

1

at写入标准错误,而不是标准输出。

要重定向两者,请使用以下命令:

at -k "now + 5 hours" <<! >/dev/null 2>&1
something
!

告诉 shell将2>&1文件描述符 2 (stderr) 重定向到与 fd 1 (stdout) 相同的文件。

于 2014-03-17T05:58:56.877 回答