[u-u] Sams book

D. Hugh Redelmeier hugh at mimosa.com
Fri Jan 15 20:12:57 EST 2016


On Fri, 15 Jan 2016, Hello Kittyhawk wrote:

| |replace all those shebangs with ":".

This I don't recollect.

| 	. o 0 ( what is this ":" you speak of? )

The shell before the Bourne shell was pretty crude (Ken's).  It had a
command ":" which didn't do anything.  The purpose was to allow you to
write labels for gotos.  goto was a command (not built-in!) that would
reposition the cursor in standard input inherited from the shell:

	: label
	echo hi
	goto label

But it was (and is) useful as an almost-comment.

syntax error:
	if true ; then
	fi

syntax error:
	if true ; then
	#
	fi

perfectly fine:
	if true ; then
	:
	fi

<http://man.cat-v.org/unix-6th/1/sh>
<http://man.cat-v.org/unix-6th/1/goto>


More information about the u-u mailing list