星期四, 6月 09, 2005

awk and quota

於課堂上有討論到quota policy的問題
就寫了一個shell script來套用

[root@nb ~]# cat quota.sh
#!/bin/bash
awk -F: '$3 > 499' /etc/passwd|cut -d: -f1 > /tmp/test
echo "Please Input your quota policy user"
read b
for i in $( cat /tmp/test )
do
echo "set quota for user"
edquota -p $b $i
echo finish
done

沒有留言: