Script help with read
From: Karyn Williams (karyn_at_calarts.edu)
Date: 02/23/05
- Previous message: Luiz Alfredo Baggiotto: "Strange problem with NSS_LDAP in Solaris 9"
- In reply to: Tim Evans: "SUMMARY: Blade 1500 OBP Patch; Three Beeps and Out"
- Next in thread: Karyn Williams: "SUMMARY: Script help with read"
- Reply: Karyn Williams: "SUMMARY: Script help with read"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 23 Feb 2005 12:42:39 -0800 To: sunmanagers@sunmanagers.org
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
- Previous message: Luiz Alfredo Baggiotto: "Strange problem with NSS_LDAP in Solaris 9"
- In reply to: Tim Evans: "SUMMARY: Blade 1500 OBP Patch; Three Beeps and Out"
- Next in thread: Karyn Williams: "SUMMARY: Script help with read"
- Reply: Karyn Williams: "SUMMARY: Script help with read"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|