Code:
# if user input is a 'y', repeat the process
a="y"
while [ $a=y ]
do
read a
echo "Bang! $a"
done
In the above script,
while [ $a=y ]
while [ $a="y" ]
while [ "$a"=y ]
while [ "$a"="y" ]
while [ $a='y' ]
etc., etc. all fails. I'm completely stuck.
What could be the correct syntax and why?