[ale] Explain Shell Script Behavior?
Wandered Inn
esoteric at atlnet.com
Mon Oct 9 15:50:25 EDT 2000
Jeff Hubbs wrote:
>
> Maybe someone can explain the why behind an observation I made last night
> while examining a Linux system that had run out of space on its root
> partition.
>
> This system runs a simple bash script every ten minutes (via cron) that goes
> out to a Web site and pulls down files. Based on what it gets, it does one
> of two things (by way of an if statement): 1) runs sendmail to spit out a
> message OR 2) does nothing and terminates. The "normal" operation is "2)
> does nothing and terminates" and that is what happens almost every time.
>
> I noticed two unusual things:
>
> * I ran ktop while the script was running and while I saw wget
> executing (that's what pulls down the files), I also saw sendmail executing
> even though the condition to cause it to run was never true.
>
> * wget has some text output that scrolls up the screen if I execute it
> manually. The reason that / filled up was because the file
> /var/spool/mail/jhubbs ("jhubbs" is the name of the account that runs the
> script) had been collecting text output from the script (including the wget
> text output), appending from each iteration of the script.
>
> Why are these things happening, and how can I stop the accumulation of
> script output in that file (maybe add "> /dev/null" to the line in crontab)?
Exactly.
I'd suggest you post the actual script as it appears that your test is
not functioning as you expect.
>
> - Jeff
>
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
Until later: Geoffrey esoteric at denali.atlnet.com
"Great spirits have always found violent opposition from mediocre minds.
The
latter cannot understand it when a man does not thoughtlessly submit to
hereditary prejudices but honestly and courageously uses his
intelligence."
- Albert Einstein
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list