Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Reading HUGE file multiple times

by Laurent_R (Canon)
on Apr 28, 2013 at 16:03 UTC ( [id://1031092]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ wc file182730char.txt
         1  28947 182729 file182730char.txt
    
  2. or download this
    $ perl -e '$t = <>; for (1..28000) { $c = int rand 28888; $d = int rand 28888; print "> $c $d \n"; print $t}' file182730char.txt > file5gb.txt
  3. or download this
    $ time  wc file5gb.txt
         56000  810600000 5116810585 file5gb.txt
    
    real    7m54.609s
    user    4m3.436s
    sys     0m10.530s
    
  4. or download this
    > 12048 6179
    reprise de la session [...] commission ne peut tout faire
    > 1024 7912
    ...
    > 3926 17512
    reprise de la session [...] commission ne peut tout faire
    > 15268 6071
    
  5. or download this
    $ perl -ne 'if (/^> /) { ($c, $d) = (split)[1,2];} else { print join " ", (split)[$c,$d]; print "\n"};' file5gb.txt > foo.txt
  6. or download this
    $ head foo.txt
    ceux cen
    la incapables
    ...
    au ces
    consequences que
    un le
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found