How to delete or remove duplicate lines in a file


rrevathy25
07-20-2009, 12:09 AM
Hii please tell me how to remove duplicate lines in any file using fortran programming.
for example
SIG 50 12 0 34 87 3.00 37.0000N 100.0000E
SIG 50 12 0 34 87 3.00 37.0000N 100.0000E
SIG 18 7 9 0 0 0.00 36.0000N 60.0000E
SSR 40 7 0 0 0 0.00 35.2000N 60.4000E

Here i want to remove first two line and replace it as one line like
SIG 50 12 0 34 87 3.00 37.0000N 100.0000E
SIG 18 7 9 0 0 0.00 36.0000N 60.0000E
SSR 40 7 0 0 0 0.00 35.2000N 60.4000E

Help me with a code if possible