> 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,

Pesonally I'd just use awk:

$ awk '$4==9 && $5=="ZZZ" {count++} END {printf count}' myfile.dat

Should do it.

Alan G. 

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to