b_rimes All American 2072 Posts user info edit post |
So I have a HUGE file that I need to parse out. Each file will be around 16meg, and will be a text file.
I want to remove the first 76 characters from each line of the file. If the legnth of the line is less than 67 characters then it should be discarded.
I then want to count the number of occurances of the character '+' that are left in the file.
Because of the size of the file - what is the best/easiest language to do this in? Could it be done using some simple unix scripting, or would it be better to create a C++ or java program to do this? 10/10/2005 1:11:40 PM |
BobbyDigital Thots and Prayers 41777 Posts user info edit post |
I'd definitely say that a shell script could do this.
I'm not a script guy, so i'll defer to others on this, but the algorithm would seem simple enough. 10/10/2005 1:22:03 PM |
jdlongNCSU All American 7105 Posts user info edit post |
perl should do it, no sweat. i've parsed files a lot larger than 16 meg in no time. 10/10/2005 1:51:09 PM |
darkone (\/) (;,,,;) (\/) 11611 Posts user info edit post |
you could do this right in vi 10/10/2005 1:53:10 PM |
LimpyNuts All American 16859 Posts user info edit post |
just read the file one line at a time and you should have no problems 10/10/2005 1:59:27 PM |
MiniMe_877 All American 4414 Posts user info edit post |
you can do it in perl really easily, like jdlongNCSU said 10/10/2005 2:02:41 PM |
Specter All American 6575 Posts user info edit post |
C++ 10/10/2005 2:35:09 PM |