csh misconceptions - (nf)

rpw3 at fortune.UUCP rpw3 at fortune.UUCP
Fri Mar 2 22:05:44 AEST 1984


#R:sri-arpa:-1695300:fortune:26900028:000:1095
fortune!rpw3    Mar  2 01:36:00 1984

We run 4.1 on our VAX and I prefer /bin/sh for Shell scripts. My scripts
obey rule (4) of the previous article, i.e., no comment. Usually I am
setting some variables, so no special action is needed. When the script
DOES start with comment, it ends up looking like:

	: 'This is a forced "comment" in all Bourne Shells and is safe'
	# rest of
	# comments...

The first line is "safe", since evaluating a single-quoted thing is o.k.

The only time I use the #!/bin/sh hack is when I NEED the setuid.
Note: If EVERYBODY did the #! hack, or if ALL kernels allowed setuid
shell scripts, I would use them more often. But since shell scripts
are long-lived, I don't (yet). I have some scripts that moved from
an ONYX to a PDP-11/44 to a 4.1 VAX/780 to a Fortune 32:16 over a period
of three years with no changes. Thanks to 'tar' and 'uucp', the original
dates are even preserved on the files! (Lesson: one-off hacks live forever!)

Rob Warnock

UUCP:	{sri-unix,amd70,hpda,harpo,ihnp4,allegra}!fortune!rpw3
DDD:	(415)595-8444
USPS:	Fortune Systems Corp, 101 Twin Dolphins Drive, Redwood City, CA 94065



More information about the Comp.unix mailing list