LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] perl file processing

[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
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell