Re: Using /dev/stderr vs. >&2
As a more accessible example, try running the following cron entry:
* * * * /tmp/crontest.sh
with the following script:
#!/bin/bash
echo "shell: $SHELL"
echo
echo "Testing /dev/stderr: "
echo foo > /dev/stderr
echo
echo "Testing >&2: "
echo bar >&2
and you'll get back something like:
shell: /bin/bash
Testing /dev/stderr:
/tmp/crontest.sh: line 7: /dev/stderr: Permission denied
Testing >&2:
bar
The two should be equivalent, so why am I getting permission errors on
the first but not the second?
--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"
Reply to: