Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: how to search for a string in large file?

by NetWallah (Canon)
on Mar 18, 2014 at 17:28 UTC ( #1078828=note: print w/replies, xml ) Need Help??


in reply to how to search for a string in large file?

Linux: grep -c "string" Very-large.file Win: find /C "string" File-name.txt Perl: perl -ne "$x++ if m/string/}{print qq|$x\n|" Large-file.txt (Change to single quote for Linux)

        What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
              -Larry Wall, 1992

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2020-12-05 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (63 votes). Check out past polls.

    Notices?