Response Yes | No Case Function
Use this boiler template to make just about any case confirmation function
#! /bin/bash
function confirm () {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure you want to continue? [Y/n]} " response
case $response in
[yY][eE][sS]|[yY])
return
;;
*)
echo "Please do not come back :)"
exit
;;
esac
}
Fill in the gaps wherever you want to add additional functions from the return prompt