[K12OSN] some scripting help
Nils Breunese
nils at breun.nl
Sat May 12 15:43:25 UTC 2007
Ray Garza wrote:
> in the script it
> 2>/dev/null
>
> and redirect output of the scron job it's
> 2>&1
>
> That's what I meant that it's a little different
It also means different things. This has nothing to do with being used in
a crontab or not.
2>/dev/null means: redirect standard error to /dev/null (i.e. errors are
not displayed, normal output is not redirected though and will still be
displayed)
>/dev/null 2>&1 means: redirect standard out to /dev/null and redirect
standard error to where standard out is redirected (i.e. don't display
normal output or errors: no output at all)
It's all explained in those docs on I/O redirection.
Nils Breunese.
More information about the K12OSN
mailing list