[ILUG] perl file processing
Marcus Furlong
furlongm at hotmail.com
Wed Oct 8 18:26:08 IST 2008
Hi, question for any perl gurus on the list.
I have a about 250 files to process that have the following format:
https://www.cs.tcd.ie/~furlongm/weka-output.txt
What I'm trying to do is find the line in the file that says "Stratified cross-validation". When I find that, I know I have the right section, and I want to move down to the table below labelled "Detailed Accuracy By Class" and sum each of the columns and print out an average for each column.
The number of lines before "Stratified cross-validation" varies per file, as does the number of classes in the file (and hence the divisor for the average).
If anyone can help with a perl script (or the basis of one), I'd be very grateful, as my bash scripting is getting me nowhere with this one..
Thanks,
Marcus.
---
_________________________________________________________________
Get the next generation of Free Windows Live Services
http://get.live.com
More information about the ILUG
mailing list