0

I'm new to shell scripting, the following is the script that I have currently.

os=$(uname -a)
if [[ $os == *"Linux"* ]];
then
    val=$(~/local/bin/python2.7 Main.py)
elif [[ $os = *"CYGWIN_NT"* ]]
then
    val=$(python Main.py)
fi

I get an error

-bash: ./run.sh: line 8: syntax error near unexpected token `elif'
'bash: ./run.sh: line 8: `elif [[ $os = *"CYGWIN_NT"* ]]

Trying to run it from Cygwin bash shell.

Zeus
  • 6,386
  • 6
  • 54
  • 89

0 Answers0