介绍shell的判断,if,if-else
test.sh
#!/bin/sh a=1 b=2 if [ $a = $b ] then echo "a=b" fi if [ $a = $b ] then echo "a=b" else echo "a!=b" fi
输出:
./test.sh a!=b
阅读: 20110
阅读: 17245 评论:1
阅读: 16416
阅读: 16409
阅读: 15790
阅读: 15563
扫扫关注微信