in reply to Delete strings
perl -i -ne 'print if $end_del ||= /1\.0/' file
/1\.0/ does a substring match; if you want to stop deleting only when the line contains nothing but "1.0", either use /^1\.0$/, or $_ eq "1.0\n".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Delete strings
by jwkrahn (Abbot) on Apr 10, 2009 at 16:00 UTC | |
|
Re^2: Delete strings
by zashwing (Initiate) on Apr 10, 2009 at 15:51 UTC | |
by almut (Canon) on Apr 10, 2009 at 16:55 UTC |