[ale] Explain Shell Script Behavior?

Jeff Hubbs Jhubbs at niit.com
Mon Oct 9 13:51:23 EDT 2000


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)?


	- Jeff

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list