Am having an issue with my Bash script, the script itself works fine however am trying to tidy it up but I cannot find/think of a method as a "goto" command and yes I am very new to Linux Bash.
My code is:
echo "What is the street road?"
read road
echo "What is the address ?"
read address
echo "User is set as: $road"
echo "Address has been set as: $address"
while true; do
read -p "Is this correct? " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) break;;
esac
done
When the user inputs "n" the script will just exit itself, but am trying to tidy it up so it will just re-loop itself here. So if the user inputs "n" it will just re-ask them again for the road and address.
I know in .bat you can do :A goto :A (Or something like that!) But in Bash am not sure how to do this?
Thanks everyone!