Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: perl oneliner on multiple files

by jwkrahn (Monsignor)
on Feb 09, 2013 at 01:12 UTC ( #1017915=note: print w/replies, xml ) Need Help??

in reply to perl onliner on multiple files

% perl -lne'/(\d+): /and$c+=$1;eof&&print"SUM.$ARGV =$c"' tmp_*

Replies are listed 'Best First'.
Re^2: perl oneliner on multiple files
by abhay180 (Acolyte) on Feb 09, 2013 at 10:18 UTC
    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*
      perl -c -lne'/(\d+): /and$c+=$1;eof&&($c=!print"SUM.$ARGV =$c")' tmp_*

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017915]
[jedikaiti]: Hi Monks
[GrandFather]: HI jedikaiti. Collected more 73p data this morning. Rubbish sky though. Seeing was between 5 and 9 arc seconds FWHM with thin cloud drifting through :(
[GrandFather]: Still, at least some of the images are good enough to get reasonable astrometry. Well, good enough for a good plate solve anyway

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-02-20 20:50 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (302 votes). Check out past polls.