From: Karyn Williams (karyn@calarts.edu)
Date: Wed Feb 23 2005 - 15:42:39 EST
Below is a script I am trying to make work but I just can't seem to make it
right. The purpose is to send an e-mail to a user who is over their quota
and still in the grace period to alert them. I want to include some user
specific details like timeleft usage and quota. The catted file is just
some test names I set up.
I do not seem to get any values using read. Everything seems to be null.
This user is over-quota (I made it so). Below is the output to quota -v
user. The echos were just to test the vars. Solaris 8. Any help would be
appreciated.
#!/bin/sh
for i in `cat /usr/local/tools/gtest.users` ; do
quota -v $i | tail -1 | read fs usage qta limit timeleft files
quota limit1
echo "$REPLY"
echo "$fs"
echo `$usage`
echo '$qta'
echo ${limit}
echo $timeleft
echo $files
mailx -s "Your account on Muse is over-quota" -r
helpdesk@calarts.edu $i <<EOT
You are over your quota on Muse. You are currently in the grace period
which still allows delivery of your e-mail. Please remove files or delete
old mail. Lack of action will result in lost e-mail and the inability to
upload files to your account. You have $timeleft left until your mail will
stop being delivered to your mailbox.
The Helpdesk can be reached at 661 253 7887 or at helpdesk@calarts.edu.
Thank you.
EOT
done
# quota -v jcraford
Disk quotas for jcraford (uid 2709):
Filesystem usage quota limit timeleft files quota limit
timeleft
/export 25734 20000 55000 6.9 days 73 0 0
#
-- Karyn Williams Network Services Manager California Institute of the Arts karyn@calarts.edu http://www.calarts.edu/network _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:13 EDT