This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: uniq not working
- From: ht at inf dot ed dot ac dot uk (Henry S. Thompson)
- To: cygwin at cygwin dot com
- Date: Tue, 11 Oct 2016 15:33:41 +0100
- Subject: Re: uniq not working
- Authentication-results: sourceware.org; auth=none
- References: <CAMZ6u3uuA8Jvz5pKtcrmb6M01WfEFVBduCPv23iu1FgKb=C+UQ@mail.gmail.com> <CAEhDDbCrMOUsOfD0FVxfBXUE1TQAqsnmCM4=03dscgSFud35fg@mail.gmail.com> <f5bd1j7yrjl.fsf@troutbeck.inf.ed.ac.uk> <1476955236.20161011171902@yandex.ru>
Andrey Repin writes:
> Greetings, Henry S. Thompson!
>
>> You may find the following bash function useful:
>
>> sus ()
>> {
>> sort "$@" | uniq -c | sort -k1nr,1
>> }
>
> Why not sort -u ?
Because then all the counts will be 1.
ht
--
Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail from me _always_ has a .sig like this -- mail without it is forged spam]
--
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