Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

how to find and delete duplicate line?

eddie
2014-03-11
2014-03-11
  • eddie
    eddie
    2014-03-11

    i have a file like this as you can see the first line "212-4444444" is duplicated
    my question is how to delete the top "212-4444444" line without change the order

    212-4444444
    347-1234556
    347-3712344
    646-4354545
    646-3454544
    718-4343434
    718-8083186
    917-2397261
    .
    .
    .
    .
    .
    .
    212-4444444
    212-1111111
    646-2222222
    646-3333333
    678-5555555

    this is what i want outcome

    347-1234556
    347-3712344
    646-4354545
    646-3454544
    718-4343434
    718-8083186
    917-2397261
    .
    .
    .
    .
    .
    .
    212-4444444
    212-1111111
    646-2222222
    646-3333333
    678-5555555

     
  • cchris
    cchris
    2014-03-11

    Using the SQL plugin, it's easy:
    1/add a comma at each end of line
    2/ add a dummy top line with two names separated by a comma, let's say aa,bb
    3/Now execute query "select aa from data"
    You'll get what you need in the original order. Just remove the 5-6 header lines from the new document that was creatd to return your query, and save it.

    CChris