[bash4.2] ${v//[/} bug?

2011-02-15 Thread Clark J. Wang
For following script: var='[hello' echo ${var//[/} With bash 4.1 it outputs hello but with 4.2 it outputs [hello . And bash 4.2 with compat41 on still outputs [hello . Bug? Or Bug fixed? -- Clark

Re: compat31

2011-02-15 Thread Greg Wooledge
On Mon, Feb 14, 2011 at 07:26:16PM -0600, Dennis Williamson wrote: The user is performing this from a shell prompt. I had him try [[ $BASH_VERSION =~ 4\.0 ]] echo yes || echo no which should output yes only if he's using Bash 4.0 *and* compat31 is on. Gah. Too much trickery and

Re: compat31

2011-02-15 Thread Marc Herbert
Le 14/02/2011 15:03, Dennis Williamson a écrit : I'm having a discussion with someone who claims that for them on Bash 4.0.33, with compat31 *off*, they are getting 3.1 behavior with quoted patterns in a =~ match. They're saying that this: [[ a =~ . ]] echo match || echo no results in

Re: compat31

2011-02-15 Thread Roman Rakus
On 02/14/2011 04:03 PM, Dennis Williamson wrote: I'm having a discussion with someone who claims that for them on Bash 4.0.33, with compat31*off*, they are getting 3.1 behavior with quoted patterns in a =~ match. Is it on Fedora? If so, it was a bug and is fixed since Fedora's bash-4.1.2-1

Re: compat31

2011-02-15 Thread Dennis Williamson
On Tue, Feb 15, 2011 at 8:45 AM, Roman Rakus rra...@redhat.com wrote: On 02/14/2011 04:03 PM, Dennis Williamson wrote: I'm having a discussion with someone who claims that for them on Bash 4.0.33, with compat31*off*, they are getting 3.1 behavior with quoted patterns in a =~ match. Is it on

Re: [bash4.2] ${v//[/} bug?

2011-02-15 Thread Chet Ramey
On 2/15/11 6:18 AM, Clark J. Wang wrote: For following script: var='[hello' echo ${var//[/} With bash 4.1 it outputs hello but with 4.2 it outputs [hello . And bash 4.2 with compat41 on still outputs [hello . Bug? Or Bug fixed? This is strange. It echoes hello on Mac OS X, but [hello on

Re: [bash4.2] ${v//[/} bug?

2011-02-15 Thread Allan McRae
On 16/02/11 11:20, Chet Ramey wrote: On 2/15/11 6:18 AM, Clark J. Wang wrote: For following script: var='[hello' echo ${var//[/} With bash 4.1 it outputs hello but with 4.2 it outputs [hello . And bash 4.2 with compat41 on still outputs [hello . Bug? Or Bug fixed? This is strange. It

Re: [bash4.2] ${v//[/} bug?

2011-02-15 Thread Chet Ramey
On 2/15/11 6:18 AM, Clark J. Wang wrote: For following script: var='[hello' echo ${var//[/} With bash 4.1 it outputs hello but with 4.2 it outputs [hello . And bash 4.2 with compat41 on still outputs [hello . Bug? Or Bug fixed? It's a bug, and I will release a patch. In the meantime,

Re: [bash4.2] ${v//[/} bug?

2011-02-15 Thread Clark J. Wang
On Wed, Feb 16, 2011 at 9:20 AM, Chet Ramey chet.ra...@case.edu wrote: On 2/15/11 6:18 AM, Clark J. Wang wrote: For following script: var='[hello' echo ${var//[/} With bash 4.1 it outputs hello but with 4.2 it outputs [hello . And bash 4.2 with compat41 on still outputs [hello .

Re: [bash4.2] ${v//[/} bug?

2011-02-15 Thread Clark J. Wang
On Wed, Feb 16, 2011 at 9:59 AM, Chet Ramey chet.ra...@case.edu wrote: On 2/15/11 6:18 AM, Clark J. Wang wrote: For following script: var='[hello' echo ${var//[/} With bash 4.1 it outputs hello but with 4.2 it outputs [hello . And bash 4.2 with compat41 on still outputs [hello .

Bash 4.2 printf %()T seems to ignore TZ

2011-02-15 Thread Dennis Williamson
When I ran make test I noticed a discrepancy in a couple of the times output during the printf tests. I pulled out the relevant section and this is what I get: LC_ALL=C LANG=C SECS=1275250155 export TZ=EST5EDT printf %()T\n $SECS printf %(%e-%b-%Y %T %Z)T\n $SECS # added %Z result: 15:09:15

Re: [bash4.2] ${v//[/} bug?

2011-02-15 Thread Dennis Williamson
On Tue, Feb 15, 2011 at 9:16 PM, Clark J. Wang dearv...@gmail.com wrote: On Wed, Feb 16, 2011 at 9:59 AM, Chet Ramey chet.ra...@case.edu wrote: On 2/15/11 6:18 AM, Clark J. Wang wrote: For following script: var='[hello' echo ${var//[/} With bash 4.1 it outputs hello but with 4.2 it

Re: [bash4.2] ${v//[/} bug?

2011-02-15 Thread Dennis Williamson
On Tue, Feb 15, 2011 at 9:54 PM, Dennis Williamson dennistwilliam...@gmail.com wrote: On Tue, Feb 15, 2011 at 9:16 PM, Clark J. Wang dearv...@gmail.com wrote: On Wed, Feb 16, 2011 at 9:59 AM, Chet Ramey chet.ra...@case.edu wrote: On 2/15/11 6:18 AM, Clark J. Wang wrote: For following script: