in reply to Wish to keep only those lines which start with letter s, and delete all other lines.
perl -i -ne'/^s/i..print' # or if we don't care about capital s... perl -i -ne'/^s/..print'
update: s/-ine/-i -ne/g # stupid mistake
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Wish to keep only those lines which start with letter s, and delete all other lines.
by blakem (Monsignor) on Dec 06, 2001 at 06:01 UTC |