question about csh quoting
merlyn at sequent.UUCP
merlyn at sequent.UUCP
Tue May 8 23:46:39 AEST 1984
> From: sloane at noscvax.UUCP
> Message-ID: <433 at noscvax.UUCP>
> Date: Mon, 7-May-84 07:52:51 PDT
>
> "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?
Different in the C-shell. You have an exclamation mark in your command line,
and that takes higher precedence than even single quotes (sometimes icky!).
To get C-shell to echo "Don't do that!", you need to say:
% echo "Don't do that\!"
and all will be fine.
-- A particularly personal and original observation from the thought-stream of
Randal L. ("C shell seller by C shore") Schwartz, esq. (merlyn at sequent.UUCP)
(Official Legendary Sorcerer of the 1984 Summer Olympics)
Sequent Computer Systems, Inc. (503)626-5700 (sequent = 1/quosine)
UUCP: {decwrl,ogcvax,pur-ee,rocks34,shell,unisoft,vax135,verdix}!sequent!merlyn
More information about the Comp.unix
mailing list