Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

perl onliner on multiple files

by abhay180 (Acolyte)
on Feb 08, 2013 at 19:33 UTC ( #1017880=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    % perl -e ' while (<>) { if (/: /) {  $c += (split /: /)[0]; }  } prin
    +t "SUM.$ARGV =$c\n"' tmp_*
    
  2. or download this
    %perl -e ' while (<>) { if (/: /) {  $c += (split /: /)[0]; }  } print
    + "SUM.$ARGV =$c\n"' | xargs cat tmp_filelist
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1017880]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (18)
As of 2014-07-31 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls