![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Please help - disk space check script | maddhadder71 | Shell Programming and Scripting | 0 | 05-08-2008 09:16 AM |
| Disk Space Monitoring Script | sriram003 | Shell Programming and Scripting | 8 | 08-23-2007 12:00 PM |
| Disk space script | asadlone | Shell Programming and Scripting | 8 | 06-03-2007 04:32 PM |
| disk space script debug - posted before | bryan | Shell Programming and Scripting | 3 | 04-28-2005 08:50 PM |
| available disk space on disk device??? | alan | UNIX for Dummies Questions & Answers | 4 | 01-02-2004 03:06 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
This my frustrating disk space script that is supposed to send me a email whenever the disk space reaches 90% but this has some problem that just would not work ..can anyone please tell me when im going wrong
#!/bin/ksh sendemail=-1 space=`df -bhk /users/siebelserver |awk '{print$5}'` echo "$space is the file size percent" #the statements below did not work, they are supposed to truncate the' % ' #capacity=${space%?} #capacity=$space|/usr/xpg4/bin/awk -F"[%]" '{ print $1}' capacity=`$space|sed s/.$//` echo "capacity is $capacity " if [ $capacity > 90 ]; then echo "alert space getting full in $HOSTNAME " sendemail=1 else echo "enough space available" fi echo $sendemail if [[ $sendemail > 0 ]] then /usr/bin/mailx -s "ALERT: Problem with file space on $HOSTNAME" "vqs@pgou p.com" fi can anyone tellme where im making a mistake.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|