0

I have written a script for word guessing in bash. But is not working properly.

w = "@@@"
read -p "input word: " var

while [ "$w" != "$var" ]
do
echo "Wrong."
read -p "input word: " var
done
echo "Right answer"

1 Answers1

0

You shouldn't have spaces when declaring varaible:

code="banana"
matanper
  • 881
  • 8
  • 24