Pregunta

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?

¿Fue útil?

Solución

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).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top