df -h | awk '{gsub("\\%","")}NR>1{print $5}'>/var/log/diskused.log
for a in 'cat /var/log/diskused.log'
do
if [ "$a" > "80" ]
then
echo "disk used>80%"
rm -rf /var/log/diskused.log
else
continue
fi
done
标签:diskused,Shell,log,--,80%,echo,时发,gsub,var
来源: https://www.cnblogs.com/josn1984/p/14481184.html