[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: empty quotes break pattern replacements in bash-4.2

From: Mike Frysinger
Subject: Re: empty quotes break pattern replacements in bash-4.2
Date: Fri, 18 Feb 2011 23:55:51 -0500
User-agent: KMail/1.13.5 (Linux/2.6.37; KDE/4.5.5; x86_64; ; )

On Friday, February 18, 2011 23:17:11 Chet Ramey wrote:
> On 2/18/11 9:06 PM, Mike Frysinger wrote:
> > this simple code no longer works in bash-4.2:
> > $ f=abc; echo ${f##""a}
> > abc
> > same goes for ${f//""a} and ${f%%""c}, and perhaps more operations
> One more: everything that calls getpattern().
> > removing the quotes, or quoting the single char in question, makes it
> > work: $ f=abc; echo ${f##a} ${f##"a"}
> > bc bc
> > 
> > the original bug report uses variables in the pattern and quotes them to
> > avoid expansion of globs and such.  but if the variable happened to be
> > empty, things no longer worked correctly.
> Try this patch.

seems to do the trick.  i'll have the original reporter (Ulrich Müller) verify 
on his end too.

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]