#! /usr/bin/bash
read num;
if [ $num -eq "100" ];
then
echo "num=100"
echo "xxx"
else
echo "num!=100"
fi
=----'-eq', >----'-gt',=---'ge',<=---'le',
[ -f "somefile" ] :判断是否文件exist
note:the space in the []
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25676270/viewspace-723289/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25676270/viewspace-723289/