dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [EXPAND] Nested parameter expansion results in an empty string when quoted
@ 2012-08-28 13:27 Todor Vlaev
  2012-08-28 23:00 ` Jilles Tjoelker
  2013-08-23 10:04 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Todor Vlaev @ 2012-08-28 13:27 UTC (permalink / raw)
  To: dash

Hi,

While playing around with parameter expansion I noticed that the
following didn't work in dash  (dash 0.5.5.1-7.4ubuntu1) as compared
to bash even though I believe it should be POSIX-compliant:

my_str=swan; last_char="${my_str#${my_str%?}}"; echo ${last_char}

If the double quotes are removed, the last character is printed correctly.

At a quick glance through the commits after the 0.5.5.1 release I saw
the following bug fix. Could it be related?

0d7d66039b614b642c775432fd64aa8c11f9a64d
[EXPAND] Fix quoted pattern patch breakage

Thanks,
Todor

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-23 10:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-28 13:27 [EXPAND] Nested parameter expansion results in an empty string when quoted Todor Vlaev
2012-08-28 23:00 ` Jilles Tjoelker
2012-08-29 13:46   ` Todor Vlaev
2012-08-29 16:35     ` Jonathan Nieder
2013-08-23 10:04 ` Herbert Xu

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