Lev Bishop wrote:

> Bash Version: 3.2
> Patch Level: 25
> Release Status: release
> 
> Description:
> I am seeing behaviour that doesn't seem to match with the manpage.
> 
> The problem is with $'strings' where there is a backslash-escaped single
> quote in the string, and somewhere later in the string there is an
> exclamation point.
> 
> Behave as expected:
> $ echo $'!'
> !
> $ echo $'!\''
> !'
> 
> Does not behave as expected:
> $ echo $'\'!'
> bash: !: event not found

History expansion understands only one type of quoted string -- single
quotes -- and does not allow backslash to escape the closing single
quote (which $'...' does).  The escaped single quote terminates the
quoted string, and history expansion is subsequently performed.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


Reply via email to