You are only redirecting stdout - you want to send stderr to /dev/null
perl myscript.pl 2> /dev/null
Hi,
Im running a bash script through cron. it executes a perls script that usually have insignificant errors that I don't care about. however it keeps emailing them to me. I've set up the bash script like this
perl myscript.pl >> /dev/null
but I still get emails with errors from the perl script.
any ideas?
thanx,
You are only redirecting stdout - you want to send stderr to /dev/null
perl myscript.pl 2> /dev/null
[quote author=ph34r link=board=9;threadid=7245;start=0#66902 date=1056115169]
You are only redirecting stdout - you want to send stderr to /dev/null
perl myscript.pl 2> /dev/null[/quote]
you might actually want > /dev/null 2> /dev/null
or > /dev/null 2>&1
or &> /dev/null
all those do the same thing and that is send both stdout and stderr to /dev/null
Bookmarks