There is a shell script it asks yes/no multiple times almost 100 times when I run twice on a server. I'm tired of typing yes every time. Is there any way to Run that script just taking yes as a default option.Assume following is my script! FYI, I can not edit my script.
Just I can run it using ./ittp-update.sh
#!/bin/bash
echo "Do you need to install the necessary compiling tools?"
select yn in "Yes" "No"; do
case $yn in
Yes ) sudo apt-get install tools; break;;
No ) <Here I want to skip to the next step. I originally left it
blank and removed the "done" command (after esac command)
to do this, but if I choose yes, it skips to the end
(where the next "done" command is and ends the script>
esac
echo "Do you need to eidt your configuration?"
select ny in "No" "Yes"; do
case $ny in
No ) <what do I put here to skip to the next tag
(labeled compile for example purposes); break;;
Yes )
esac
echo "You have 3 options with how you can edit you config file."
....
yes | ./ittp-update.shwill answeryesto all questions (by enteringyesfollowed by a newline over and over).