Description
Two adjacent lines are referred to as almost identical if they differ only
in the last character.
Given a datafile, there is at most one line almost identical to a given one.
We want to remove lines almost identical to the others.
|
| Raw Input
| 3 some text a
3 some text b
7 more text a
7 more text b
83 non matching line a
375 some more text a
375 some more text b
478 another non matching line b
|
|
| Desired Output
| 83 non matching line a
478 another non matching line b
|
|
Script and Comments
Script1 [ 1] $!N
[ 2] /^([^\n]*).\n\1.$/d
[ 3] P
[ 4] D
| |
|