Posted By

thebugslayer on 06/17/07


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

melling


sum of column


 / Published in: Groovy
 

  1. drwxrwxr-x 24 root admin 816 Nov 26 2006 CPsrsc-50
  2. drwxr-xr-x 13 zemian zemian 442 Sep 20 2005 JChessBoard-1.5.z1
  3. drwxr-xr-x 28 zemian admin 952 Mar 13 21:14 PDFBox-0.7.3
  4. drwxr-xr-x 18 zemian admin 612 Apr 4 2006 abator-0.6.1-119
  5. ''').readLines()[1..-2].inject(0){ sum, it -> sum += it.split(/\s+/)[4].toInteger() }

Report this snippet  

You need to login to post a comment.