Re: Very slow pattern substitution in parameter expansion

2013-04-10 Thread Chet Ramey
On 4/10/13 12:15 AM, Dan Douglas wrote: > On Tuesday, April 09, 2013 10:23:34 PM Chet Ramey wrote: >> On 4/9/13 9:56 PM, Dan Douglas wrote: >>> Erm, here it is in a less unreadable format: >> >> It is pretty slow. You forgot to enable `extglob'. > > D'oh! > > Bad algorithm? I suppose it's lots

Re: Very slow pattern substitution in parameter expansion

2013-04-09 Thread Dan Douglas
On Tuesday, April 09, 2013 10:23:34 PM Chet Ramey wrote: > On 4/9/13 9:56 PM, Dan Douglas wrote: > > Erm, here it is in a less unreadable format: > > It is pretty slow. You forgot to enable `extglob'. D'oh! Bad algorithm? I suppose it's lots of backtracking and maybe has to test every substri

Re: Very slow pattern substitution in parameter expansion

2013-04-09 Thread Chet Ramey
On 4/9/13 9:56 PM, Dan Douglas wrote: > Erm, here it is in a less unreadable format: It is pretty slow. You forgot to enable `extglob'. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRUc...@ca

Re: Very slow pattern substitution in parameter expansion

2013-04-09 Thread Dan Douglas
Erm, here it is in a less unreadable format: #!/usr/bin/env bash typeset -a a=( curl --header 'Host: v33.veehd.com' --header 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0' --header 'Accept: text/html,application/xhtml+xml,ap