标签:
if 条件; then
语句
fi
if 条件; then
语句
else
语句
fi
if 条件; then
语句
elif 条件; then
语句
fi
if 条件; then
语句
elif 条件; then
语句
else
语句
fi
(1)判断字符串相等
if [ "foo" = "foo" ]; then echo expression evaluated as true else echo expression evaluated as false fi result : expression evaluated as true
(2)
---------------------初次乍到,待补充------
标签:
原文地址:http://www.cnblogs.com/xinqi/p/4901687.html