in reply to Removing repeated lines from file

Have a look at the Perl Power Tool (PPT) project's implementation of the UNIX uniq command.

You'll need to sort your data before passing it through Tomte's solution or uniq.


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.

Replies are listed 'Best First'.
Re: Removing repeated lines from file
by Abigail-II (Bishop) on Jun 24, 2003 at 12:40 UTC
    Considering that one of the requirements was to keep the order of the line, you'd also need to undo the sort.

    Abigail

Re: Re: Removing repeated lines from file
by matth (Monk) on Jun 24, 2003 at 12:36 UTC
    Each line is made up of 1 or two tab delimited lines. Could I just stick this into a MySQL database and remove duplicated rows using SQL?