Hello.
I have a problem.
When i run 1.sh, ask me yes or no, and, if i asnwerd yes, there continue the procediment
"sudo -u root echo hello"
. All without putting it into a single script, and who uses the confirm many more scripts.
I have two script.
1 with the following code confirm.sh
#################################
#!/bin/bash
while true; do
echo
read -p "esta seguro de hacer lo que sea que vaya a hacer (yes/n)" yn
case $yn in
yes ) break;;
not ) exit;;
* ) echo "por favor responda yes o no";;
esac
done
2� script 1.sh
#######
confirm.sh normal ("sudo-u root stopserver.sh")