X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:reply-to:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=pE/YT8jTn5Tf4H6G
	3mPUjGj8q58UFID4K86CAKbIRy/isLF52n8OMQjpY1fc9IOfjvuPrODb2jQ+R2KZ
	szA3anRSONHM5uwOH8HV203paJwV1JbSfhOVMYqKw3IADGh25HMXsRxdmaqFWQxX
	S1L7mV/dYlJFUkek0pouHHa866Q=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:reply-to:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=YHGRm3FYqYHkiV/bcNyPMw
	Bt1Gg=; b=ESDUOaKDq4Lkoi48scQn7U25fh9WOYS0Vcxdnl2QJwZH8Rijb4vh7p
	2+iu95RWBw76M/qFUx/pYtoxSMZfl/3uyuCzlK56p25O8M9ew4tfG9VGXP5LMWr5
	iAu8vlUZLzKAOQfhN9zv1ZW5tcOGfnw014PKJPKkKYesj2RWbT9Yo=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:ip*192.168.1.101, H*r:LMTP, H*M:post, H*MI:sk:UQ@mail
X-HELO: mail.ddt-consult.de
Subject: Re: uniq not working
To: cygwin@cygwin.com
References: <CAMZ6u3uuA8Jvz5pKtcrmb6M01WfEFVBduCPv23iu1FgKb=C+UQ@mail.gmail.com>
Reply-To: cygwin@cygwin.com
From: =?UTF-8?Q?Markus_Sch=c3=b6nhaber?= <cygwin@list-post.mks-mail.de>
Message-ID: <d806984a-4d8d-bc8b-3e5a-2d2603f9a0be@list-post.mks-mail.de>
Date: Tue, 11 Oct 2016 12:58:29 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <CAMZ6u3uuA8Jvz5pKtcrmb6M01WfEFVBduCPv23iu1FgKb=C+UQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

Am 11.10.2016 um 12:43 schrieb Felipe Vieira:

> the uniq program seems to be faulty on my cygwin:
> 
[...]
> /tmp » uniq -c u.txt
>       1 1
>       1 2
>       1 3
>       1 4
>       1 5
>       1 1
>       1 2
>       1 3
>       1 6
>       1 7
>       1 8
>       1
> /tmp »
> 
> As you can see it does not eliminate duplicate lines.
> This file was created with vim. Same results if created with windows notepad.
> What am I missing?

From man uniq:

| Note:  'uniq' does not detect repeated lines unless they are
| adjacent.  You may want to sort the input first, or use 'sort -u'
| without 'uniq'.

-- 
Regards
  mks


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

