#!/bin/bash
test=$(df -h | grep sda5 | awk '{print $5}' |cut -d "%" -f 1)
if [ "$test" -ge "10" ]
then
echo "ROM:我要报警啦!"
fi
test=$(df -h | grep sda5 | awk '{print $5}' |cut -d "%" -f 1)
if [ "$test" -ge "10" ]
then
echo "ROM:我要报警啦!"
fi
2016-09-17
#!/bin/bash
read -t 30 -p "pls enter your username:" username
echo -e "\n"
read -t 20 -s -p "pls enter your passwd:" passwd
echo -e "\n"
if [ "$username" == "root" ];then
if [ "$passwd" == "789" ];then
echo "OK!!"
else
echo "Your passwd is wrong!!"
fi
else
echo "Your username is wrong!!"
fi
read -t 30 -p "pls enter your username:" username
echo -e "\n"
read -t 20 -s -p "pls enter your passwd:" passwd
echo -e "\n"
if [ "$username" == "root" ];then
if [ "$passwd" == "789" ];then
echo "OK!!"
else
echo "Your passwd is wrong!!"
fi
else
echo "Your username is wrong!!"
fi
2016-08-29
equals
not equals
greater than
later than
greater than or equals to
not equals
greater than
later than
greater than or equals to
2016-08-27