Syntax error near unexpected token 'elif' shell script -


i facing syntax error near unexpected token,elif error following code.

if [ "$1" == "abc" ];     echo "abc"  elif [ "$1" == "xyz" ];     echo "xyz"  else       echo "unkown parameter"     exit 0  fi 

error is: abc.sh: line 28: syntax error near unexpected token elif' abc.sh: line 28:elif [ "$1" == "xyz" ]; then

code seems alright point add os on running. == works fine linux redhat/suse or solaris machine on os hpux or aix don't work. should use = correct comparing strings.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -