Subject: Re: shell expansions
To: Wolfgang Rupprecht <wolfgang@wsrcc.com>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 07/29/2000 01:38:51
On 29 Jul 2000, Wolfgang Rupprecht wrote:

# Are shells allowed to expand '!'s inside double quotes?  The most
# recent bash (2.04.0(1)-release (i386--netbsd)) gripes about the
# following:
# 
#         $ echo "ouch!"
#         bash: !": event not found
# 
# In contrast, /bin/sh echos "ouch!" exactly as I had expected.

...as you should expect.  /bin/sh does not support history backreferences.

However, your point is taken:
bash$ echo "ouch!"
bash: !": event not found
bash$ csh -f
% echo "ouch!"
ouch!
% exit
bash$ tcsh -f
: echo "ouch!"
ouch!
: exit
bash$

ksh works similary to sh, since bang-backreferences are not supported.

So bash is broken.  Someone should either bitch to the bash support
people about it or they should patch it and send it in.  Or both. :-)

# -wolfgang

				--*greywolf;
--
BSD: Feed The Computer.