3 ms·
> The command > goto argument > 'rewinds' its standard input. It then reads the standard input looking for the syntax of a : command with an argument matchi
by jolmg 6y ago
> The command
> goto argument
> 'rewinds' its standard input. It then reads the standard input looking for the syntax of a : command with an argument matching it own. It leaves the standard input positioned after the : command. When control is returned to the shell, execution continues where the standard input was positioned. (This implies certain things about file positioning and open file sharing that will not be discussed here.)
Oh man, `:` makes so much sense now. It was originally meant to be like a label.
- userbinator 6y agoDOS' COMMAND.COM and later Windows' cmd.exe works the same way.