bug-bash
[Top][All Lists]
Advanced

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

Multi-line bash strings that end in ! improperly treated as event design


From: Lane Schwartz
Subject: Multi-line bash strings that end in ! improperly treated as event designator
Date: Fri, 21 Aug 2015 16:17:41 -0500

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCO$
uname output: Linux cl 3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64 $
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 11
Release Status: release

Description:
        Per the Bash Reference Manual, section 9.3.1 "Event Designators", a bare exclamation point should be treated as "Start[ing] a history substitution, except when followed by a space, tab, the end of line, '=', or '('". Bash fails to respect this behavior when a multi-line string ends in a bare exclamation point. In such cases, the exclamation point is in fact followed by the end of line. Despite this fact, Bash treats the exclamation point as the start of a history substitution. In contrast, this errant behavior is not observed when a bare exclamation point terminates a single-line string. 

Repeat-By:
        $ echo "He didn't fall? Inconceivable!"

        $ echo "He didn't fall?
> Inconceivable!"



reply via email to

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