From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: uniq without sort <-------------- GURU NEEDED Date: Fri, 25 Jan 2008 10:11:33 +0100 Message-ID: <99E29314-8D08-4FE8-A1A0-3BE49EBA65E9@Web.DE> References: <08698dfa-d5dc-484d-a5fb-fe84bb0d2893@s13g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1201253213 15430 80.91.229.12 (25 Jan 2008 09:26:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2008 09:26:53 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: gnuist006@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 25 10:27:12 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JIKq3-0000be-Fc for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Jan 2008 10:27:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIKpd-0005tt-6Z for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Jan 2008 04:26:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIKb8-00066A-4s for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:11:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIKb4-00064Z-RB for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:11:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIKb3-000645-Lj for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:11:37 -0500 Original-Received: from fmmailgate01.web.de ([217.72.192.221]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIKb3-000368-Dw for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:11:37 -0500 Original-Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id 1DD5ACE6A8EB; Fri, 25 Jan 2008 10:11:36 +0100 (CET) Original-Received: from [195.4.206.43] (helo=[192.168.1.2]) by smtp06.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.109 #226) id 1JIKb1-0002Dm-00; Fri, 25 Jan 2008 10:11:36 +0100 In-Reply-To: <08698dfa-d5dc-484d-a5fb-fe84bb0d2893@s13g2000prd.googlegroups.com> X-Mailer: Apple Mail (2.753) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX18GlBmyn0wbtb+UjHre0RHqnyITxe/KbQTiTnCx ITIk8YYAFUWC06MYUx7VcgOuk42rAjDp5r2uuLfZ9aqkc+YQfw VqPwItXzV7fArhyhtmaw== X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50943 Archived-At: Am 25.01.2008 um 03:45 schrieb gnuist006@gmail.com: > 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 =20 something invalid. Filter the array that all invalid entries are =20 eliminated. -- Greetings Pete To drink without thirst and to make love all the time, madam, it is =20 only these which distinguish us from the other beasts. =96 Beaumarchais