Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-02-22 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (322 votes). Check out past polls.