shell脚本的if-else-elif

#!/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,之前忽略了这个问题,再次记录下~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章