[kwlug-disc] Capturing output in scripts

Khalid Baheyeldin kb at 2bits.com
Sat Aug 23 09:43:43 EDT 2014


On Sat, Aug 23, 2014 at 12:10 AM, unsolicited <unsolicited at swiz.ca> wrote:

> Not what I meant.
>
> Doesn't calling it from cron as 'myscript 2>&1 >/var/log/myscript.log'
> take care of it?
>

No, because the idea is to save the output to a file, then email the output
with a proper subject, rather than the cryptic standard cron subject with
the name of the script.

The saving of the log needs to be inside the script, not from whomever is
calling it.


> What I meant was, isn't the solution found in how you call it from the
> command line? (Not from which / where the command line is.)
>
>
>
> On 14-08-22 10:41 PM, Khalid Baheyeldin wrote:
>
>> On Thu, Aug 21, 2014 at 3:33 PM, unsolicited <unsolicited at swiz.ca>
>> wrote:
>>
>>  Is it not not two scripts, but how you call the script in the first
>>> place?
>>>
>>>
>> Called from my crontab.
>>
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>



-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140823/66e82e67/attachment.htm>


More information about the kwlug-disc mailing list