question about csh quoting, "!"

Jerry Aguirre jerry at oliveb.UUCP
Wed May 9 06:36:23 AEST 1984


The csh adds a history mechanism which enables the user to edit and
repeat commands with out retyping them.  The default meta character
used to access the history mechanism is the exclamation mark (!).  The
choice of this character has been criticized (have to escape uucp
addresses) but that what it is.

It gets more interesting in that quotes do not disable the history
metacharacter as double quotes disable *globing and single quotes
disable $variables.  The only way to type it is to escape it with a
backslash.  Thus to mail to you I would have to type:

	mail ...sdcsvax\!noscvax\!sloane

(I hope the backslash ! makes it thru the mail.)  I think single
quoting should have disabled the ! but that's not the way they did it.

For your example use:

	%echo "Don't do that\!"

So it's not a bug, it's a feature!

					    Jerry Aguirre
    {hplabs|fortune|ios|tolerant|allegra|tymix}!oliveb!jerry



More information about the Comp.unix mailing list