Hey :) I am trying to understand the command goto. I have some questions regarding the goto manual. Here you can find the original manual: http://man.cat-v.org/unix-6th/1/goto
1. Goto is allowed only when t̲h̲e̲ S̲h̲e̲l̲l̲ i̲s̲ t̲a̲k̲i̲n̲g̲ c̲o̲m̲m̲a̲n̲d̲s̲ f̲r̲o̲m̲ a̲ f̲i̲l̲e̲.
What does the underlined part mean? I'm not allowed to type goto in the shell? But if goto is written into a file everything is okay?
2. The file is searched from the beginning for a line beginning with ':' followed by one or more spaces followed by the label.
So if a part of my file looks like this
... goto end ...
Then he would look for a part like this
: endBut I have seen some scripts and I think they were from Unix v6, it looked everytime like this
end: So what is now the right order?
3. If such a line is found, the goto command returns. Since the read pointer in the command file points to the line after the label, the effect is to cause the Shell to transfer to the labelled line.
Is it legal to write any other command in the line with the ":"?
:end echo "Hello" or
end: echo "Hello"
Thank you for your help and Merry Christmas :)