question about csh quoting

Ed Nather nather at utastro.UUCP
Wed May 9 11:47:56 AEST 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?

You have banged into job control -- the "!" character signifies some previous
"event" to the C-Shell, despite the quote.  You'll find the same problem if
you try to send mail separating site names :  mail seismo!alice will get the
response "alice: Event not found."  The solution is to "escape" the "!" 
character with a backslash:  "Don't do that\!" will work fine.  So far as I
know, *only* the "!" character causes this kind of trouble with the C-Shell.
But it *is* a pain in the \*ss.


      Gary K. Sloane
      c/o Naval Ocean Systems Center
      COTD Building 1 Room B205
      San Diego, California 92152

      MILNET: sloane at nosc
      UUCP:   ...{sdcsvax}!noscvax!sloane
      DDD: (619) 225-8401 x391


-- 

                                       Ed Nather
                                       ihnp4!{ut-sally,kpno}!utastro!nather
                                       Astronomy Dept., U. of Texas, Austin



More information about the Comp.unix mailing list