I was reading this post and found it useful for a script I am trying to write, but where do I put the code to execute if the proper input is given.
My code is as such:
while true; do
read -p "Do you wish to install this program?" yn
case $yn in
[Yy]* ) make install; break;;
[Nn]* ) exit;;
* ) echo "Yes or No";;
esac
done
Now the code i am trying to execute (with confirmation) is:
apt-get install vsftpd
So where does that code actually go? I might just be dumb when it comes to this, but I cannot figure this out.