work on memory with bash script
some days ago i had to write a script to parse a giant log file and write some entries in other file. the script was working fine (was just an egrep and a echo plus some more little things) but was taking hours to parse each log file. a friend of mine did the same procedure in java and the parse ran superfast. the logic was the same, and analizing, we concluded that java ran faster cause worked with the informantion in memory to write to the disc after the procedure, when the bash script was writing to the disc after every cicle.
is there a way, in bash, to work in memory, doing some kind of mmap, and write in the disc after a while?
forgive my poor english and tks in advance
post your script so that we can look at it and tell you how to change it.
|All times are GMT -5. The time now is 11:00 PM.|