I'm creating a sort of interactive tutorial that works like the following:
echo "What do you press if you want to move one word backwords in bash?"
read ans
if [ "$ans" == "ESCb" ]; then
echo RIGHT!
else
echo WRONG!
fi
Now, how can I input the ESC character (ASCII 27 decimal) in string literal? ESC
certainly doesn't work.
I understand I probably better off use another language, but this is an assignment and it's required to be in bash script.