":" as a csh command

Karl Kleinpaste karl at cbrma.att.com
Wed Dec 24 23:58:58 AEST 1986


drw at cullvax.UUCP writes:
>What does the ':' command to csh do?  When I type
>	:
>or	...
>	...
>csh doesn't seem to do anything, but if I type
>	: a
>it says ":: Too many arguments".

`:' is used to specify labels in scripts, as in
	if ($?some_variable) goto label
		commands to skip if some_variable exists
	label:
	more commands
When typed at an interactive prompt, it's a no-op.  But try typing
"goto there" at an interactive prompt; csh will keep reading lines and
doing absolutely nothing with them whatever until you type a line
which says "there:" and nothing else.
-- 
Karl



More information about the Comp.unix.questions mailing list