# sign in shell/cshell scripts...

Larry Campbell campbell at maynard.UUCP
Fri Apr 18 09:37:22 AEST 1986


> From: Alex Bronstein <ALEX at SU-SIERRA.ARPA>
> 	I'm encountering weird problems with sh (and sometimes csh)
> dying on some shell scripts depending on whether or not my first line in
> the script is a comment like:
> # This script does this (but not that)
> 
> 	I am looking for ANY hint/story/random knowledge concerning
> # in shell scripts.

Early versions of the Bourne shell (like the one shipped with VENIX 2.0)
did not recognize # as a comment delimiter -- in fact it didn't have ANY
comment delimiter.  I worked around this partially by creating a zero-length
executable file called /bin/#.  That works as long as there are no shell
metacharacters in the comment.  If there are, you're out of luck.
-- 
Larry Campbell                                 The Boston Software Works, Inc.
ARPA: maynard.UUCP:campbell at harvard.ARPA       120 Fulton Street
UUCP: {harvard,cbosgd}!wjh12!maynard!campbell  Boston MA 02109



More information about the Comp.unix.wizards mailing list