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
Post a Comment