This (untested) may do what you want:
perl -nE"/: / and $c+= (split/: /)[0]; if( eof(ARGV) ){ say qq[SUM.$AR +V =$c]; $c=0 }" tmp_*
provides the while(<>){} loop.
checks for the end of each individual file, prints the results and resets $c to 0.
gives you the names of the individual files in the output.
In reply to Re: perl onliner on multiple files
by BrowserUk
in thread perl onliner on multiple files
by abhay180
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |