dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G.raud" <graud@gmx.com>
To: dash@vger.kernel.org
Subject: Re: [NO-BUG] quoted substring parameter expansion ignores single-quotes in the arg
Date: Thu, 19 Oct 2017 12:41:30 +0200	[thread overview]
Message-ID: <20171019104103.7gzflupyi27artlg@gmx.com> (raw)
In-Reply-To: <20170926034148.ohemy3jubd2nskyj@gmx.com>

Wrong bug report.

In fact the beahviour of dash on "a=\\'a\\'; echo \"\${a%'}\"" is that
of POSIX and of zsh 5.  However 'bash --posix', 'mksh -o posix' and
pdksh fail to parse the command and ksh does not remove the quote from

On Tue, Sep 26, 2017 at 05:41:48AM +0200, G.raud wrote:
> Subject: [BUG] quoted substring parameter expansion ignores single-quotes
>  in the arg
> 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-10-19 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  3:41 [BUG] quoted substring parameter expansion ignores single-quotes in the arg G.raud
2017-10-19 10:41 ` G.raud [this message]
2017-10-21 12:13   ` 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=20171019104103.7gzflupyi27artlg@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).