Hello,
i have CentOS Linux and a file inside /etc/cron.d/crons
That fle contains this line:
Quote:
51 0 */7 * * root /bin/sh /root/scripts/script 1>/dev/null
|
The /root/scripts/script contains:
Quote:
echo " something $(hostname)" >> /tmp/output
|
When the cron runs the script, i receive an e-mail with that echoed content ("something my.hostname") even in crontab i attempt to redirect script STDOUT to /dev/null
I want to mute all STDOUT of that script but not mute STDERR
Currently i am using 1>/dev/null
I think i can use 2>&1 > /dev/null
but currently used redirect (1>/dev/null) is more simple, not sure why not work, what is the most simple command to redirect it the way i need?