shell脚本的if-else-elif

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/qq_32590631/article/details/88108663
#!/bin/bash
salt=`python test.py`
salt1=`python test1.py`
if [ "$1" = "jumper" ]
then
	./dosome.sh $salt
elif [ "$1" = "jumper1" ]
then
	./dosome1.sh $salt1
else
	./login"$1".sh $salt
fi	

总之就是出现了if 后面总会跟个then, 不管是if还是elif,之前忽略了这个问题,再次记录下~

猜你喜欢

转载自blog.csdn.net/qq_32590631/article/details/88108663