Re: Output of Cron Clogging up my inbox.

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

 



Am Do, den 22.04.2004 schrieb Neil Bird um 11:29:

> This sort of thing works fine for me (to prevent output).  I hope 
> that <space> is a cut'n'paste error, though:  I don't think "2 >&1" will 
> do anything like you expect.  I may be wrong, though :-)  - but I do 
> always do it space-less: "2>&1".

Right, there is no space between 2 and > allowed. The instructions
means, that file descriptor 2 (stderr) shall go to same place as file
descriptor 1 (stdout).

You can self test the behaviour with this little commands:

1) cat foo
2) cat foo > /dev/null
3) cat foo 2>&1
3) cat foo 2>&1 > /dev/null
4) cat foo > /dev/null 2>&1

and as a final test run
5) cat foo > /dev/null 2 >&1

So the answer given by Herbert Gasiorowski would be the correct command
setup, if not using a script to check whether an internet connection is
established or if not suppressing mail output from cronjobs by using
MAILTO="".

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 1 (Yarrow) on Athlon CPU kernel 2.4.22-1.2179.nptl
Sirendipity 15:48:36 up 3 days, 22:34, load average: 0.36, 0.16, 0.10 
                   [ ÎÎÏÎÎ Ï'ÎÏÏÎÎ - gnothi seauton ]
             my life is a planetarium - and you are the stars

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux