This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: uniq not working
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: ht at inf dot ed dot ac dot uk (Henry S. Thompson), cygwin at cygwin dot com
- Date: Tue, 11 Oct 2016 17:19:02 +0300
- Subject: Re: uniq not working
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp3m.mail.yandex.net; dkim=pass header.i=@yandex.ru
- References: <CAMZ6u3uuA8Jvz5pKtcrmb6M01WfEFVBduCPv23iu1FgKb=C+UQ@mail.gmail.com> <CAEhDDbCrMOUsOfD0FVxfBXUE1TQAqsnmCM4=03dscgSFud35fg@mail.gmail.com> <f5bd1j7yrjl.fsf@troutbeck.inf.ed.ac.uk>
- Reply-to: cygwin at cygwin dot com
Greetings, Henry S. Thompson!
> You may find the following bash function useful:
> sus ()
> {
> sort "$@" | uniq -c | sort -k1nr,1
> }
Why not sort -u ?
> With you data:
>> sus u.txt
> 2 1
> 2 2
> 2 3
> 1 4
> 1 5
> 1 6
> 1 7
> 1 8
> ht
--
With best regards,
Andrey Repin
Tuesday, October 11, 2016 17:18:39
Sorry for my terrible english...
--
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