You can't delete lines from a file. You can copy a file while doing modifications to what is copied. So after opening the two files,
- While the source hasn't been exhausted,
- Read a line from the source.
- If line contains '1.0' or such a line was already found,
- Print the line to the destination.
As a one-liner:
perl -ne"print if $f ||= /1\.0/" infile >outfile
or in-place:
perl -i.bak -ne"print if $f ||= /1\.0/" file
Update: The above were for the Windows Command shell. Below are adaptations for bash:
perl -ne'print if $f ||= /1\.0/' infile >outfile
or in-place:
perl -i~ -ne'print if $f ||= /1\.0/' file
|