Brett Parker wrote:
On Thu, Jan 26, 2006 at 05:13:37PM +0000, Mark Rogers wrote:
  
       oldusage=`cat ~/.diskspacewarning`
    
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could be better... how
         about...
         oldusage=$(<~/.diskspacewarning)
  

Nice, I prefer that. (I've been scripting for years but never had the need and therefore time to play with shell scripts, which I really *should* be much better at).

There's (obviously) a few more tweaks that could be put in, but hey, it
now fits it's requirements, don't break what doesn't need fixing :)
  

If it ain't broke, keep fixing it until it is!

Basically, I'm trying to learn from this so keeping it as it is just because it works may lead me to bad habits.

Anyway, I now have some hysteresis issues; level hovering around 95% leads to a level at 95%/94%/95%/94%/etc, and triggers an email each time it goes back to 95%. Haven't decided yet the best way to handle that, so suggestions welcomed!

-- 
Mark Rogers
More Solutions Ltd :: 0845 45 89 555