SIMPLE RULES OF THE UNIX FORUMS:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post or send a private message where your goal is to get an answer more quickly.
The bourne shell vesion of my previous script :
Code:
#!/usr/bin/sh
usage=50
time_limit=3
set -- `sed -n 's/.*\([0-9]\+\)%.*\([0-9][0-9]\):[0-9][0-9]:[0-9][0-9].*/\1 \2/;T;p' out.txt`
percentage=$1
hours=$2
echo "${percentage}% ${hours}h"
if [ $percentage -gt $usage ] ;then
echo "Disk usage beyond $usage%"
#send mail
fi
if [ $hours -gt $time_limit ] ;then
echo "Time limit beyond $time_limit hours"
#send mail
fi