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,之前忽略了這個問題,再次記錄下~

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