Loading ...
Sorry, an error occurred while loading the content.

23978Re: [Clip] Deleting duplicate lines

Expand Messages
  • flo.gehrke
    Aug 31, 2013
      --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
      > (...) you can eliminate the dupes by loading into NTP and
      > sorting. This, of course will sort all records in the database
      > alphabetically, either ascending or descending.


      In order to avoid the sorting you could try...

      ^!Set %Nr%=0
      ^!Inc %Nr%
      ^!If ^%Nr% > ^$GetTextLineCount$ End
      ^!Jump ^%Nr%
      ^!Set %Line%=^$GetParagraph$
      ^!Replace "^P"^%Line%"" >> "" AS
      ^!Goto Loop

      In a CSV file like...


      the clip will remove line #4 and #5 (duplicates of line #1) without sorting.

      Note: You possibly have to adapt the search pattern to a different data structure.

    • Show all 11 messages in this topic