<html><head></head><body>If you&#39;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.<br>
-Adam<br><br><div class="gmail_quote">On January 23, 2015 9:47:37 AM CST, Grigory Shamov &lt;Grigory.Shamov@umanitoba.ca&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi All,<br /><br />I have a weird (or stupid idk) problem. A script of mine produces<br />different results when ran interactively as root, from when ran as a cron<br />job.<br /><br />used=`report -i --csv 2&gt;/dev/null | awk '/Total/ {print $4}'`<br />echo $used is Total<br /> <br /><br />The command executed says "Using config file XXX" to stderr and something<br />useful to stdout of which I extract the value of  Total. Redirecting the<br />barf to /dev/null. <br /><br />Now as a cron job the $used is empty. I believe that cronjob would<br />redirect stderr to stodut? But here it happens also for the subprocesses ?<br />Confused..<br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>