Output of Cron Clogging up my inbox.
Alexander Dalloz
alexander.dalloz at uni-bielefeld.de
Thu Apr 22 13:58:41 UTC 2004
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040422/86ee5a30/attachment-0001.sig>
More information about the fedora-list
mailing list