syntax error near unexpected token
I am brand new at scripting and am having some trouble with syntax errors. I am trying to run a simple script game but get the follwing error: syntax error near unexpected token 'Y>'
Here is script, any help or advice is appreciated.
echo "You have entered the world of the Dragon Slayer"
echo " Do you wish to continue?"
if [ $choice = "Y" ]
echo "User chose Yes"
echo "User chose No"
case "$choice" in
echo "Y chosen"
echo "N chosen"
echo "You are leaving the lair!"
In your case statement, each choice should be followed by a right parenthesis, not an angle bracket (greater than sign). You have also forgotten to end your case statement with an esac.
That did the trick. Thank you for the help.
|All times are GMT -5. The time now is 04:39 PM.|