[RndTbl] stderr/stdout in Linux cronjobs?

Adam Thompson athompso at athompso.net
Fri Jan 23 10:22:45 CST 2015

If you've put those two lines in your crontab, they get executed as separate jobs.  Do the subscription directly in the echo command without using a variable, or put it in another script and call that script from crontab.

On January 23, 2015 9:47:37 AM CST, Grigory Shamov <Grigory.Shamov at umanitoba.ca> wrote:
>Hi All,
>I have a weird (or stupid idk) problem. A script of mine produces
>different results when ran interactively as root, from when ran as a
>used=`report -i --csv 2>/dev/null | awk '/Total/ {print $4}'`
>echo $used is Total
>The command executed says "Using config file XXX" to stderr and
>useful to stdout of which I extract the value of  Total. Redirecting
>barf to /dev/null. 
>Now as a cron job the $used is empty. I believe that cronjob would
>redirect stderr to stodut? But here it happens also for the
>subprocesses ?
>Grigory Shamov
>Westgrid/ComputeCanada Site Lead
>University of Manitoba
>E2-588 EITC Building,
>(204) 474-9625
>Roundtable mailing list
>Roundtable at muug.mb.ca

Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.muug.mb.ca/pipermail/roundtable/attachments/20150123/248a5fed/attachment.html>

More information about the Roundtable mailing list