dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Parameter substitution bug
@ 2013-01-21 21:36 Mark Lentczner
  2013-08-23 10:49 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Lentczner @ 2013-01-21 21:36 UTC (permalink / raw)
  To: dash

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

Strangely I ran across this issue in the real world: A doubly nested
parameter substitution with an inner glob pattern (breath) fails /only
when in double quotes/! That is, these two expressions produce
different results:

${f%${f#?}}   --vs--  "${f%${f#?}}"

Strangely, that is the simplest case I get to fail.

The following script walks through the issue, and if run with bash,
ksh, or busybox exhibits those two expressions as producing the same
result.

- Mark
(Note: Not on mailing list, so please reply all to include me!)

[-- Attachment #2: dash-bug.sh --]
[-- Type: application/x-sh, Size: 1616 bytes --]

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

* Re: Parameter substitution bug
  2013-01-21 21:36 Parameter substitution bug Mark Lentczner
@ 2013-08-23 10:49 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2013-08-23 10:49 UTC (permalink / raw)
  To: Mark Lentczner; +Cc: dash

On Mon, Jan 21, 2013 at 09:36:07PM +0000, Mark Lentczner wrote:
> Strangely I ran across this issue in the real world: A doubly nested
> parameter substitution with an inner glob pattern (breath) fails /only
> when in double quotes/! That is, these two expressions produce
> different results:
> 
> ${f%${f#?}}   --vs--  "${f%${f#?}}"
> 
> Strangely, that is the simplest case I get to fail.
> 
> The following script walks through the issue, and if run with bash,
> ksh, or busybox exhibits those two expressions as producing the same
> result.

This should be fixed now.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-21 21:36 Parameter substitution bug Mark Lentczner
2013-08-23 10:49 ` 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).