Re: using mapfile is extreamly slow compared to oldfashinod ways to read files

2009-03-27 Thread Chris F.A. Johnson
On Fri, 27 Mar 2009, Lennart Schultz wrote: Chris, I agree with you to use the right tool at the right time, and mapfile seems not to be the right tool for my problem, but I will just give you some facts of my observations: using a fast tool like egrep just to find a simple string in my datafil

Re: using mapfile is extreamly slow compared to oldfashinod ways to read files

2009-03-27 Thread Lennart Schultz
Chris, I agree with you to use the right tool at the right time, and mapfile seems not to be the right tool for my problem, but I will just give you some facts of my observations: using a fast tool like egrep just to find a simple string in my datafile gives the following times: time egrep '/dev/

Re: using mapfile is extreamly slow compared to oldfashinod ways to read files

2009-03-27 Thread Greg Wooledge
On Thu, Mar 26, 2009 at 05:59:14PM -0400, Chris F.A. Johnson wrote: >Chet, how about an option to mapfile that strips leading and/or >trailing spaces? > >Another useful option would be to remove newlines. It already has the latter: -tRemove a trailing newline fr

[IGNORE THIS] Just testing if I can post to the list from Google Groups

2009-03-27 Thread Clark J. Wang
See this message? Fine. :)

Re: using mapfile is extreamly slow compared to oldfashinod ways to read files

2009-03-27 Thread Stephane CHAZELAS
2009-03-26, 21:22(-04), Chet Ramey: > Chris F.A. Johnson wrote: > >>Chet, how about an option to mapfile that strips leading and/or >>trailing spaces? >> >>Another useful option would be to remove newlines. > > I'm disinclined to add one, since it's easy enough to use the > ${line##[