Subject: Re: shell expansions
To: Wolfgang Rupprecht <>
From: Greywolf <>
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. 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!"
% exit
bash$ tcsh -f
: echo "ouch!"
: exit

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

BSD: Feed The Computer.