http://www.perlmonks.org?node_id=1017945


in reply to Re: perl oneliner on multiple files
in thread perl onliner on multiple files

Hi, Thanks....this also will work..but w a slight correction...need to zero out $c at eof.
perl -lne'/(\d+): /and$c+=$1; eof&&print"SUM.$ARGV =$c"; if(eof) {$c=0 +}' tmp_1*