":" as a csh command
Kent Black
kab at reed.UUCP
Sat Jan 3 04:41:11 AEST 1987
In article <5576 at cbrma.att.com> karl at cbrma.att.com (Karl Kleinpaste) writes:
>
> `:' 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
Or, try typing
% foo:
% echo hi
% goto foo
Oh boy, high level control structures in an interactive shell ;-)
(4.3 (mt. xinu) on VAX/785 in case it doesn't work)
-- kab
More information about the Comp.unix.questions
mailing list