[ale] cron mail, how to STOP it.

Geoffrey esoteric at 3times25.net
Thu Oct 20 15:08:01 EDT 2005


Paul Cartwright wrote:
> On Thu October 20 2005 11:04 am, Cliff Free wrote:
> 
>>What about doing " blahblah > /dev/null 2>&1" ?
> 
> 
> THAT is the line I remember, but I just can't remember what it DOES...
> refresh my memory, ">/dev/nulll" does redirect standard output?
> or is that 2>&1..

'>/dev/null' redirects standard output to /dev/null. (the 1 is assumed)
so '1>/dev/null' is the same as '>/dev/null'

2>&1 redirects standard error to standard out.
Thus everything goes to the bit bucket.

1 is standard out
2 is standard error
0 is standard in

You can create additional file descriptors as follows:

exec 3>/tmp/output

date >&3 # writes the date to /tmp/output


so '1>/dev/null' is the same as '>/dev/null'

-- 
Until later, Geoffrey



More information about the Ale mailing list