GOTO(1) General Commands Manual GOTO(1) NAME goto - transfer command SYNOPSIS goto label [...] DESCRIPTION Goto is allowed only when the shell is taking commands from a seekable command file (see lseek(2)). The entire command file is searched for a line beginning with a : as the first non-blank character, followed by one or more blanks, and then the label. If such a line is found, goto repositions the command-file offset to the line after the label and exits. This causes the shell to transfer to the labelled line. : is a special command which causes the shell to do nothing. EXIT STATUS The goto command exits with one of the following values: 0 The label was found. 1 The label was not found. 2 An error was detected. SEE ALSO if(1), etsh(1), tsh(1) Etsh home page: https://etsh.io/ COMPATIBILITY The goto command from Sixth Edition (V6) UNIX requires : to be the first character on the labelled line. Otherwise, the label cannot be found. This port differs in that : may be preceded by blanks. This allows labelled lines to be indented so that complex command files might be easier to read and understand. HISTORY A goto command appeared as /bin/goto in Third Edition UNIX. AUTHORS This port of the goto command is derived from Sixth Edition (V6) UNIX /usr/source/s1/goto.c. Presumably, Ken Thompson of Bell Labs wrote it. Jeffrey Allen Neitzel ported and currently maintains it as goto(1). LICENSE See either the LICENSE file which is distributed with etsh or https://etsh.io/license/ for full details. etsh-5.3.1 August 23, 2018 GOTO(1)