I can do this in bash:
while read -n1 -r -p "choose [y]es|[n]o"
do
if [[ $REPLY == q ]];
then
break;
else
#whatever
fi
done
which works but seems a bit redundant, can i do something like this instead?
while [[ `read -n1 -r -p "choose [y]es|[n]o"` != q ]]
do
#whatever
done