- #!/bin/sh
- idx_start=6
- idx_end=18
- percent=`df -h /Storage|grep Storage|awk '{print $5}'|cut -d '%' -f 1`
- while [ $percent -ge 80 -a $idx_start -ge 1 ]
- do
- echo $idx_start $idx_end
- /usr/bin/run_log_clear.sh $idx_start $idx_end
- percent=`df -h /Storage|grep Storage|awk '{print $5}'|cut -d '%' -f 1`
- idx_start=$(( idx_start-1 ))
- idx_end=$(( idx_end-1 ))
- sync
- done
|