0
我剛開始學習外殼,並試圖有條件的,如果別人當我得到這個錯誤team.sh: line 9: syntax error: unexpected end of file
: -文件意外結束而努力,如果其他條件
#!/bin/sh
result=2
tmp=2
if [ $result == $tmp ]
echo "App is running"
else
echo "App is down"
fi
你需要寫'如果[$結果= = $ tmp]; then'。請參閱:http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-6.html –