bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: escaping ! in quoted string gives wrong result


From: Chet Ramey
Subject: Re: escaping ! in quoted string gives wrong result
Date: Fri, 18 Jun 2004 01:08:18 -0400
User-agent: Mozilla Thunderbird 0.6 (Macintosh/20040502)

adi@pirx.hexapodia.org wrote:

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: openbsd3.4
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='openbsd3.4' -DCONF_MACHTYPE='i386-unknown-openbsd3.4' 
-DCONF_VENDOR='unknown' -DSHELL  -DHAVE_CONFIG_H  -I.  
-I/usr/ports/shells/bash2/w-bash-2.05b/bash-2.05b 
-I/usr/ports/shells/bash2/w-bash-2.05b/bash-2.05b/include 
-I/usr/ports/shells/bash2/w-bash-2.05b/bash-2.05b/lib  -O2
uname output: OpenBSD pirx.hexapodia.org 3.4 GENERIC#18 i386
Machine Type: i386-unknown-openbsd3.4

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        Like some other shells, bash interprets ! inside double quotes.
        However, bash does not handle escaped ! like other shells.

        "\!foo" should turn into `!foo' before being passed to the command.

It should not.  `!' is not one of the characters that is treated
specially when in a double-quoted string.  This is one of the places
where bash's sh heritage and the csh-derived history expansion features collide.

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]