dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G.raud" <graud@gmx.com>
To: dash@vger.kernel.org
Subject: [BUG] ignored substring parameter expansion after $@ ("$@""${v%/*}") command line)
Date: Tue, 26 Sep 2017 05:39:59 +0200	[thread overview]
Message-ID: <20170926033942.z4m5jglztiqjxzda@gmx.com> (raw)

To test that the param susbtitution in "$@""${v%*/}" is ignored (on a
command line or in an assignment):

$ dash -c 'v=1/2; w="$@""${v#*/}"; echo "$@""${v#*/}" "$w"'

Note that the quoting has to be around each variable, that the first has
to be $@ and that the bug occurs with %, %%, #, or ## substring
processing.

Adding a string in between the 2 required vars does not change the
behaviour:

$ dash -c 'v=1/2; echo "$@"s$u"s${v#*/}"'

except by adding a string, even empty, inside the quoting of $@:

$ dash -c 'v=1/2; echo "$a$@""${v#*/}"'

Regards

-- 
G.raud Meyer
graud@gmx.com

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

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20170926033942.z4m5jglztiqjxzda@gmx.com \
    --to=graud@gmx.com \
    --cc=dash@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).