in reply to Removing Lines from a file
$ cat myfile 1st line 2nd line 3rd line $ perl -ni.bak -e 'next if /^2nd/; print;' myfile $ cat myfile 1st line 3rd line $ cat myfile.bak 1st line 2nd line 3rd line $
I hope this is of use.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Removing Lines from a file
by cephas (Pilgrim) on Oct 18, 2006 at 17:33 UTC | |
by johngg (Canon) on Oct 18, 2006 at 18:38 UTC |