[Top][All Lists]

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

History expansion quoting problem

From: Philipp Sasse
Subject: History expansion quoting problem
Date: Fri, 8 Sep 2017 10:18:22 +0200

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' -DCONF_MACHTYPE='x86_64-pc-linux-gn
uname output: Linux 64ws1231 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 
(2017-06-26) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 4.4
Patch Level: 12
Release Status: release
  Executing something like
    echo "foo
    bar" | sed '/foo/!d'
  results in an error. Apparently the history expansion considers only quoting 
characters on the same input line, so the closing double quote is taken as 
opening double quote, escaping the following single quotes, thus these don't 
escape the ! anymore.
  Can be easily reproduced with the given command (of course set -H)
  I have no patch ready, but parsing for history expansion needs to consider 
the whole input, not just the current line.

Best regards, Philipp.

reply via email to

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