Question

I was wondering how I would suppress the following output.

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

when using the "at - k" command. I have tried using it like

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

but I keep getting the output. Any suggestions?

Was it helpful?

Solution

at writes to stderr, not to stdout.

To redirect both, use the following:

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

The 2>&1 tells the shell to redirect file descriptor 2 (stderr) to the same file as fd 1 (stdout).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top