gnu.emacs.help
[Top] [All Lists]

Re: uniq without sort <-------------- GURU NEEDED

Subject: Re: uniq without sort <-------------- GURU NEEDED
From: Peter Dyballa
Date: Fri, 25 Jan 2008 10:11:33 +0100
Newsgroups: gnu.emacs.help



Am 25.01.2008 um 03:45 schrieb gnuist006@xxxxxxxxx:

The algorithm is this. For every line, look above if there is another
line like it. If so, then ignore it. If not, then output it. I am
sure, I can spend some time to write this in C. But what is the
solution using shell ?

Put the output to make unique into an array. Mark a duplicate with something invalid. Filter the array that all invalid entries are eliminated.

--
Greetings

  Pete

To drink without thirst and to make love all the time, madam, it is only these which distinguish us from the other beasts.
                                – Beaumarchais






<Prev in Thread] Current Thread [Next in Thread>