3 ms·
there are some early unix tapes floating around, and in those early shells, i'm fairly certain the colon was one of only two special-cased code paths after the
by __del__ 2mo ago
there are some early unix tapes floating around, and in those early shells, i'm fairly certain the colon was one of only two special-cased code paths after the command line was parsed. does anyone recall more specifically?
- teytra 2mo agoI think colon at the start of a line was used for labels for goto statments. https://www.in-ulm.de/~mascheck/bourne/PWB/goto.1.html https://www.in-ulm.de/~mascheck/bourne/PWB/goto.1.html DESCRIPTION Goto is allowed only when the Shell is taking commands from a file. The file is searched from the beginning for a line beginning with `:' followed by one or more spaces followed by the label. 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.