Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: jgd@alpha3.csd.uwm.edu (John G Dobnick)
Subject: Re: Mysterious cron output
Date: 1999/07/13	[thread overview]
Message-ID: <7mfo51$foe$1@uwm.edu> (raw)
In-Reply-To: 378ad4c8.4200909@netnews.worldnet.att.net

>>I recently took over a couple of Digital systems, both 3.2G and 4.0D,
>>which for some reason sends messages from crontab jobs to root, like
>>this:
>>   [.. snip...]
>>
>>The line in cron is as follows:
>>
>>00,10,20,30,40,50 * * * * /usr/local/bin/supervision >>
>>/var/tmp/supervision/supervision.log 2>&1
>>
>>Can something in the script being run override the redirection? Or how
>>can I get mail with this redirection? Can something in the setup of cron
>>change this?

  Shells process redirection in the order encountered (or at least /bin/sh
  does so).

  Thus... you redirect standard output to the file, and _then_ redirect
  the STDERR stream back to the STDOUT stream -- which is still the
  original STDOUT -- namely your "terminal", _not_ the redirected stream.

  Try doing the   "2>&1"  before the ">>" and see what happens.
  It works for me.

--
John G Dobnick                          "Knowing how things work is the basis
Information & Media Technologies         for appreciation, and is thus a
University of Wisconsin - Milwaukee      source of civilized delight."
jgd@csd.uwm.edu   ATTnet: (414) 229-5727                    -- William Safire




  parent reply	other threads:[~1999-07-13  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-12  4:00 Mysterious cron output Hans Westerback
     [not found] ` <378ad4c8.4200909@netnews.worldnet.att.net>
1999-07-13  4:00   ` John G Dobnick [this message]
1999-07-13  4:00   ` Hans Westerback
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox