Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: What is the best way to remove(delete) specific lines from a very large file?

by fundflow (Chaplain)
on Dec 02, 2001 at 22:55 UTC ( [id://128996]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    cat big-file.txt | grep -v 'bad line' > new-file.txt
    
  2. or download this
    perl -i.orig -pe '$_="" if /bad line/' big-file.txt
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://128996]
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: (4)
As of 2024-04-19 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found