How do I prompt for Yes/No/Cancel input in a Linux shell script?
The simplest and most widely available method to get user input at a shell prompt is the read command. The best way to illustrate its use is a simple demonstration: while true; do read -p “Do you wish to install this program? ” yn case $yn in [Yy]* ) make install; break;; [Nn]* ) exit;; … Read more