[Tutor] counting problem

cgw501@york.ac.uk cgw501 at york.ac.uk
Mon Aug 1 22:05:03 CEST 2005


hi,

I have large txt file with lines like this:

['DDB0216437']	1166	1174	9     ZZZ   100

What I want to do is quickly count the number of lines that share a value 
in the 4th column and 5th (i.e. in this line I would count all the line 
that have '9' and 'ZZZ'). Anyone got any ideas for the quickest way to do 
this? The solution I have is really ugly. thanks,

Chris


More information about the Tutor mailing list