BASH and YES or ECHO cannot send "!"

Mike McCarty mike.mccarty at sbcglobal.net
Wed Dec 14 18:14:42 UTC 2005


wwp wrote:
> Hello Mike McCarty,
> 
> 
> On Wed, 14 Dec 2005 11:45:37 -0600 Mike McCarty <mike.mccarty at sbcglobal.net> wrote:
> 
> 
>>wwp wrote:
>>
>>>Hello jdow,
>>>
>>>
>>>On Tue, 13 Dec 2005 21:41:52 -0800 "jdow" <jdow at earthlink.net> wrote:
>>>
>>>
>>>
>>>>From: "Synister Syntax" <synistersyntaxlist at gmail.com>
>>>>
>>>>>echo "Hello World! "
>>>>>
>>>>>also works...
>>>>>
>>>>>   Just don't have !" on top of each other like that.  An extra
>>>>>spcae should't get in the way?
>>>>>Hope this adds to your research.
>>>>
>>>>Of coure, "!" is an annoyance. "&" can kill a machine.
>>>> echo this will destroy your machine & rm -rf /
>>>>is not quite the same thing as
>>>> echo "This won't destroy your machine & rm -rf /"
>>>>
>>>>ALWAYS be careful about quoting when using special characters.
>>>
>>>[snip]
>>>
>>>The point would be for a (new) user to know that ! is a special one :-),
>>>that's not trivial.
>>
>>I'm hardly a "new" user of bash. I've used it since about 1994
>>or so on HPUX, Solaris, and now Linux.
> 
> [snip]
> 
> Hmm sorry for this confusion, my remark was more general and not especially
> dealing w/ your former post, and new was between (), just to point that the
> sentence could even apply to new users. So let's consider how a bash newbie
> would be confused to discover that a single ! between "" has a special
> meaning :-). Of course, RTFM..

My point was to confirm and strengthen what you said. Even
"old" users of bash find it confusing and find little
"gotchas" hidden in unexplored nooks and crannies.

And, for bash, the FM has gotten too Fing big to read
reasonably because it has too Fing many "features".

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the users mailing list