This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: uniq not working
- From: Markus Schönhaber <cygwin at list-post dot mks-mail dot de>
- To: cygwin at cygwin dot com
- Date: Tue, 11 Oct 2016 12:58:29 +0200
- Subject: Re: uniq not working
- Authentication-results: sourceware.org; auth=none
- References: <CAMZ6u3uuA8Jvz5pKtcrmb6M01WfEFVBduCPv23iu1FgKb=C+UQ@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
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