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

2009-03-28 Thread Lennart Schultz
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

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

2009-03-27 Thread Lennart Schultz
2009, Lennart Schultz wrote: I have a bash script which reads about 25 lines of xml code generating about 850 files with information extracted from the xml file. It uses the construct: while read line do case $line in done file and this takes a little less than 2 minutes

contents of whole arrays dissapears leaving while read loop

2009-03-26 Thread Lennart Schultz
'^#' in front of the while loop -- Regards, Lennart Schultz

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

2009-03-26 Thread Lennart Schultz
ways to traverse a mapfile array, but if this the case please document it. Another suggestion for mapfile: please introduce an option to strip leading blanks so mapfile acts like readline so constructions like: line=$(echo $i) # strip leading blanks above can be avoid. -- Regards, Lennart Schultz