Re: Bad performance for substring replacement by pattern

2010-08-03 Thread Eric Blake
On 08/03/2010 03:12 PM, Chet Ramey wrote: > On 7/12/10 4:27 PM, Yi Yan wrote: >> >> Hi, >> >> I used the following Bash script to test substring replacement operator. >> It is performance get worse very quickly with the increasing of the string >> length. > > This is a pathological case. I d

Re: Bad performance for substring replacement by pattern

2010-08-03 Thread Chet Ramey
On 7/12/10 4:27 PM, Yi Yan wrote: > > Hi, > > I used the following Bash script to test substring replacement operator. > It is performance get worse very quickly with the increasing of the string > length. This is a pathological case. I don't really see how to optimize it very well. The p

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Eric Blake
[adding autoconf to document some shell bugs] On 08/03/2010 02:32 PM, Ralf Wildenhues wrote: > Interesting shell unportability: > > $ bash -c 'f=" val" e=; echo "$e"$f' > val > $ ksh -c 'f=" val" e=; echo "$e"$f' > val > > ksh93, dash, zsh all do it like ksh. Is that a bug in bash? Yes; addin

Re: RFE? request for an "undefined" attribute for functions

2010-08-03 Thread Marc Herbert
Le 02/08/2010 20:11, Bernd Eggink a écrit : > The other is that 'function' is clear and > self-explaining, while 'name()' wrongly suggests that function > parameters should be surrounded by parentheses. ... but only to people whose experience with Unix shells is close to zero. Functions are not