dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G.raud" <graud@gmx.com>
To: dash@vger.kernel.org
Subject: [BUG] quoted substring parameter expansion ignores single-quotes in the arg
Date: Tue, 26 Sep 2017 05:41:48 +0200	[thread overview]
Message-ID: <20170926034148.ohemy3jubd2nskyj@gmx.com> (raw)

To test that the single quotes are considered ordinary chars when
double-quoting the parameter expansion:

$ dash -c "a=\\'a\\'; echo \"\${a%'}\""

The result is surprising and non consistent with a non double-quoted
expansion where the single-quotes act as quotes:

$ dash -c "a=a%; echo \${a%'%'}"

Additionally the manual states that the arg to substring processing is
processed as an ordinary word (as probably POSIX too).


G.raud Meyer

             reply	other threads:[~2017-09-26  3:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  3:41 G.raud [this message]
2017-10-19 10:41 ` [NO-BUG] quoted substring parameter expansion ignores single-quotes in the arg G.raud
2017-10-21 12:13   ` [BUG] " Jilles Tjoelker
2017-10-25 10:08     ` Martijn Dekker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170926034148.ohemy3jubd2nskyj@gmx.com \
    --to=graud@gmx.com \
    --cc=dash@vger.kernel.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).