question about csh quoting - (nf)

jab at uokvax.UUCP jab at uokvax.UUCP
Wed May 16 11:27:00 AEST 1984


#R:noscvax:-43300:uokvax:6100032:000:1006
uokvax!jab    May 15 20:27:00 1984

/***** uokvax:net.unix / noscvax!sloane /  7:03 pm  May  8, 1984 */
"The UNIX Programming Environment" by Kernighan and Pike (copyright 1984
by Bell Labs) states the following:

	"...Quotes of one kind protect quotes of the other kind:

		$ echo "Don't do that!"
		Don't do that!
		$
	..."

When I tried that (4.2bsd with csh) it did the following:

		%echo "Don't do that!"
		": Event not found.
		%

Is this something different in the c-shell, or is this an error in
the c-shell?
/* ---------- */

Very different about the cshell. That "!" is quite a special character,
being your "history character". When the cshell parser saw that
	!"
it tried to remember what command you had previously typed in that began
with a double quote. When it didn't find it, it complained.

To prevent the exclamation point from being special, we can make some
other characters serve the functions of "!" and "^":
	% set histchars = "%*"
Then what Kernighan/Pike suggest works for the cshell also.

	Jeff Bowles
	Lisle, IL



More information about the Comp.unix mailing list