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

Answer: How do I strip lines prefixed by a

by tachyon (Chancellor)
on Feb 27, 2003 at 13:21 UTC ( #239087=categorized answer: print w/replies, xml ) Need Help??

Q&A > regular expressions > How do I strip lines prefixed by a "#" - Answer contributed by tachyon

perl -pi.bak -e 's/^#.*\n//' <file>

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the fire pops...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-08-18 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (298 votes). Check out past polls.

    Notices?