LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   work on memory with bash script (http://www.linuxquestions.org/questions/linux-general-1/work-on-memory-with-bash-script-723595/)

chesterman 05-04-2009 12:59 PM

work on memory with bash script
 
hi folks,

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

emetib 05-04-2009 01:25 PM

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 03:33 PM.