I want to pause input in a shell script, and prompt the user for choices. The standard Yes, No, or Cancel type question. How d
Yes
No
Cancel
This solution reads a single character and calls a function on a yes response.
read -p "Are you sure? (y/n) " -n 1 echo if [[ $REPLY =~ ^[Yy]$ ]]; then do_something fi