介绍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
阅读: 19981
阅读: 17114 评论:1
阅读: 16268
阅读: 16210
阅读: 15677
阅读: 15442
扫扫关注微信