/bin/sh feature? - (nf)

mwm at ea.UUCP mwm at ea.UUCP
Thu Jul 19 08:25:00 AEST 1984


#R:uvm-cs:-27400:ea:13500021:000:1019
ea!mwm    Jul 18 17:25:00 1984

/***** ea:net.unix-wizar / pur-phy!crl / 12:26 am  Jul 16, 1984 */
A further peeve about '#' is that, at least on 4.2 BSD,
saying 'rm #*' doesn't work from the tty in sh since the '#' makes the
rest of the line be treated as a comment.  Csh does not allow '#' from 
the terminal.

Charles LaBrec
UUCP:		pur-ee!Physics:crl, purdue!Physics:crl
INTERNET:	crl @ pur-phy.UUCP
/* ---------- */

How long are people going to keep spreading that silly rumor? It just flat
isn't true. Csh is smart enough to realize that "#<non-blank>" or
"<non-blank>#" are *not* comment markers. Hence "lpr -#3" does what you
want, and causes three copies of your output to get printed.

To verify that "rm #*" would work, I did the present the following (from a
4.2 mtxinu binary):

	Script started on Wed Jul 18 17:22:13 1984
	% ls #*
	No match.
	% foreach i (1 2 3 4)
	? 	cp /dev/null #$i
	? 	end
	% ls #*
	#1	#2	#3	#4
	% rm #*
	% ls #*
	No match.
	% ^D
	script done on Wed Jul 18 17:22:50 1984

Looks like the "rm #*" works to me.

	<mike



More information about the Comp.unix.wizards mailing list