sh to grep and replace text files

Hello I was wondering what is a way you can put in your code that acts like goto for bash in windows ?

lets say i have a if yes or no question how would i go about doing that?

Also how can i search for text inside a file and insert my text into that part if you dont mind me asking?

If you need a GOTO, you did something wrong, or chose the wrong language. Windows batch programs require the use of GOTO because it lacks constructs like blocks, loops, functions, and case/switch decisions. The simplest case for your example would be:

read yesno
case ${yesno} in
    [Yy] ) echo "Yes" ;;
    [Nn] ) echo "No" ;;
    * ) echo "Other" ;;
esac

For loops (for/while/until) there's break and continue.

Ok so if user types in yes what i would do after that for example if yes then goto other place if no then goto another place how would that be implemented? and thankyou pludi

like this?

for [Yy] then  do balhbalhblahb  

for  [Nn] then do blalalslsls
case ${yesno} in
  [Yy])
    do balhbalhblahb
  ;;
  [Nn])
    do blalalslsls
  ;;
esac

When i use something like

read yesno
case ${yesno} in
    [Yy] ) echo "Yes" ;;
    [Nn] ) echo "No" ;;
    * ) echo "Other" ;;
esac

case ${yesno} in
  [Yy])
    do echo "hi"
  ;;
  [Nn])
    do echo " test"
  ;;
esac

it just acts as if its executing and does nothing ?

Using case statements