I have a shell script that essentially says something like
while true; do read -r input if [\"$input\" = \"a\"]; then echo \"hello world\"
so the final working snippet is the following:
#!/bin/bash while true; do read -rsn1 input if [ "$input" = "a" ]; then echo "hello world" fi done