Running 'at' on either Debian Jessie or Raspbian Jessie, output seems to go down a black hole whatever I do. I'm wanting to capture errors, but even in the simple case of stdout I can't seem to capture output.
I'm trying, for example:
echo "curl 'http://www.example.com' > tmp.log" | at -M -t 201706042241.36
tmp.log is always empty, but the same curl
not put through at
produces the expected html. If I omit the -M I get nothing.
What I really want is the error output. If I try
echo "curl 'http://badbadbad.example.com' 2>&1 > tmp.log" | at -M -t 201706042241.36
I get an empty tmp.log; and if I omit -M I get an empty email. If I omit the redirects, thus:
echo "curl 'http://badbadbad.example.com'" | at -t 201706042241.36
I also get an empty email. I'd expect to see curl: (6) Could not resolve host: badbadbad.example.com
There's nothing in syslog, messages or daemon.log in /var/log. I'm running the commands as an ordinary user, not root.
at
seems to hijack and discard every attempt to obtain the output from the command I'm running. Am I misunderstanding something about at
?