我是shell脚本的新手,以下是我目前的脚本。
os=$(uname -a)
if [[ $os == *"Linux"* ]];
then
val=$(~/local/bin/python2.7 Main.py)
elif [[ $os = *"CYGWIN_NT"* ]]
then
val=$(python Main.py)
fi
我收到错误
-bash: ./run.sh: line 8: syntax error near unexpected token `elif'
'bash: ./run.sh: line 8: `elif [[ $os = *"CYGWIN_NT"* ]]
尝试从Cygwin bash shell运行它。