":" as a csh command
David Elliott
dce at quacky.UUCP
Sun Dec 21 03:57:18 AEST 1986
In article <666 at cullvax.UUCP> drw at cullvax.UUCP (Dale Worley) writes:
>What does the ':' command to csh do? When I type
> :
>or
> ::
>or
> ::::::
>csh doesn't seem to do anything, but if I type
> : a
>it says ":: Too many arguments".
>
It helps you prevent running a shell script with csh. A file beginning
with
: run this with sh, not csh
will fail immediately if run by csh.
You see, you can no longer reliably distinguish csh and sh scripts
by looking for '#' as the first character, since AT&T Unix systems
allow # as a comment and do not have csh scripts (it sure would
be nice if everyone spoke #!).
David Elliott
Mips Computer Systems
More information about the Comp.unix.questions
mailing list