Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How do I delete/modify one line from test file ?

by marcos (Scribe)
on Jun 22, 2000 at 19:04 UTC ( #19445=note: print w/replies, xml ) Need Help??


in reply to How do I delete/modify one line from test file ?

perl -ni.bak -e 'print unless /(b\|)*b/' filename
This line edit in place (-n option) filename removing any line like b|b|b|b, and save the original filename as filename.bak (-i.bak option).
I'm not sure this is what you need, but I hope it helps
marcos

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2021-05-06 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (69 votes). Check out past polls.

    Notices?