Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Making commond for large number of files

by aaron_baugher (Curate)
on Apr 17, 2015 at 17:57 UTC ( [id://1123803]=note: print w/replies, xml ) Need Help??


in reply to Making commond for large number of files

#!/usr/bin/env perl use 5.010; use strict; use warnings; my $low = 999999999; my $lowfile; my $lowline; for my $f (@ARGV){ open my $fd, '<', $f or die $!; while(<$fd>){ if(/SCF Done\s*=\s*([\d\.]+)/ and $1 < $low){ $low = $1; $lowfile = $f; $lowline = $.; } } close $fd; } say "File '$lowfile' contains lowest SCF Done value of $low on line $l +owline";

This took 10 minutes, half of which was spent preparing the data files for testing. Next time you want to "receive" your work done for you, maybe it'd be smart to pay a programmer for an hour of work and spend the rest of the week struggling on a paid vacation.

Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1123803]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found