Removing duplicate

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Marteinn Sverrisson

Removing duplicate

Post by Marteinn Sverrisson »

1) Can I remove duplicated lines with Textpad?
2) Can I remove lines that have the first x characters the same as another line?
Andreas

Re: Removing duplicate

Post by Andreas »

1) can be done when sorting the file
2) ? (don't know of a way to do it)
Roy Beatty

Re: Removing duplicate

Post by Roy Beatty »

You cannot do it through Sort.

How would you decide which of the two lines to keep?
Marteinn Sverrisson

Re: Removing duplicate

Post by Marteinn Sverrisson »

>How would you decide which of the two lines to keep?

It would be the first instance
Roy Beatty

Re: Removing duplicate

Post by Roy Beatty »

It sounds like a database might serve your purpose better than a flat text file.
Geoff Houck

Re: Removing duplicate

Post by Geoff Houck »

If you'd like, I can send you a simple command-line text-sorting utility which allows
you to sort and remove duplicates based on the sort keys or whole record (arbitrarily picking one or more of them to delete).

Or, you can find the utility at: http://home.attbi.com/~hksys (go to the Download
page, and download FSORT).

Or, drop a line at the above address or hksys@attbi.com.

Yours,

Geoff Houck
Post Reply