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
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
'^#'
in front of the while loop
--
Regards,
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