bug-bash
[Top][All Lists]
Advanced

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

Improper parsing of ! within double quotes


From: Saint skullY the Dazed
Subject: Improper parsing of ! within double quotes
Date: Sat, 12 May 2001 09:38:27 -0700
User-agent: Mutt/1.2.5i

Versions of bash tested: 1.14.7(1) 2.04.0(1)-release 2.05.0(1)-release
Hardware: Intel i386
Operating System: Linux 2.2.19, Linux 2.2.16
Compiler: gcc 2.95.2

Bash can't seem to handle correctly parsing backslash characters that appear
just before the bang (!) character, when both are enclosed in double quotes.

(skully@cryos:~)0$ echo hi!
hi!
(skully@cryos:~)0$ echo hi\!
hi!
(skully@cryos:~)0$ echo 'hi!'
hi!
(skully@cryos:~)0$ echo "hi!"
bash: !": event not found
(skully@cryos:~)0$ echo "hi\!"
hi\!

This may be a philisophical bug, as it seems to be present in all versions
of bash. However, neither ksh93 or tcsh seem to have the same behavior, and
it runs counter-intuitive to how the backslash is usually parsed.

All versions tested are as compiled for Slackware 7.1 or current. Also
tested against Bash 2.03.8(1)-release as compiled for redhat 6.2. I believe
all versions have C Shell style bang parsing on.

-skullY



reply via email to

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