Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 having an uproarious good time at the Monastery: (6)
As of 2017-05-23 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?