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
The easiest way to achieve this with the least number of lines is as follows:
read -p " : y/n/cancel" CONDITION; if [ "$CONDITION" == "y" ]; then # do something here! fi
The if is just an example: it is up to you how to handle this variable.
if