in reply to perl onliner on multiple files
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_*
- -n:
provides the while(<>){} loop.
- the if( eof(ARGV) )
checks for the end of each individual file, prints the results and resets $c to 0.
- $ARGV:
gives you the names of the individual files in the output.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom