标签:The echo exit print tail esc sage use tin
#!/bin/bash
####
## Desc diskalert.sh
## Auth justin@itskills.cn
## Date 20190919
## Usage bash diskalert.sh
####
if [ `whoami` != cad ]
then
echo "pls run as cad user"
exit 0
fi
# while version
while :
do
used=$(df -hT / | tail -n 1 | awk ‘{print $6}‘ | awk -F% ‘{print $1}‘)
if [ $used -lt 80 ]
then
echo "$HOST this disk will be full"
fi
sleep 3600
done
标签:The echo exit print tail esc sage use tin
原文地址:https://blog.51cto.com/justinit/2439251