[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] some scripting help



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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]