delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/10/11/10:34:10

X-Recipient: archive-cygwin AT delorie DOT 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:to:subject:references:from:date:in-reply-to
:message-id:mime-version:content-type; q=dns; s=default; b=N8nME
SR+FhIs7DCRJYY8uQBBEjjXALwx1m90B8OOJzltkvDjJjjb2smO1j7NIuf4PUdT+
kC5DKB1LfCTLbnd1Uys7drD0K8XmeEPTmacXZjPmjBj6JKsNN4/N1FKTNGle8vg6
AaEbMubdVPJq2YrIPsD/L4YvOWsaFsgZdyLvKI=
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:to:subject:references:from:date:in-reply-to
:message-id:mime-version:content-type; s=default; bh=YcWFVavgt9f
jJRbDsPxLsDiLKAM=; b=wHxNZyvItyUTjQOmUK2xa0hOQussjxkqZvMXUWvwcfj
GVB0fckLbx77AopQaLhrlhWcKdMzphFLOAsel2onFtZd0AMUbCi04oMSZ00+sdWU
QpmtUyoChNZ4TLsTBK9dB7LHsBZbvUr1RGqgBIWbv7uu9sfvDDX1QgmAhNIfWo0Y
=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Repin, repin, thompson!, H*f:sk:f5bd1j7
X-HELO: loire.is.ed.ac.uk
To: cygwin AT cygwin DOT com
Subject: Re: uniq not working
References: <CAMZ6u3uuA8Jvz5pKtcrmb6M01WfEFVBduCPv23iu1FgKb=C+UQ AT mail DOT gmail DOT com> <CAEhDDbCrMOUsOfD0FVxfBXUE1TQAqsnmCM4=03dscgSFud35fg AT mail DOT gmail DOT com> <f5bd1j7yrjl DOT fsf AT troutbeck DOT inf DOT ed DOT ac DOT uk> <1476955236 DOT 20161011171902 AT yandex DOT ru>
From: ht AT inf DOT ed DOT ac DOT uk (Henry S. Thompson)
Date: Tue, 11 Oct 2016 15:33:41 +0100
In-Reply-To: <1476955236.20161011171902@yandex.ru> (Andrey Repin's message of "Tue\, 11 Oct 2016 17\:19\:02 +0300")
Message-ID: <f5b4m4jymyi.fsf@troutbeck.inf.ed.ac.uk>
User-Agent: Gnus/5.1012 (Gnus v5.10.12) XEmacs/21.5-b34 (linux)
MIME-Version: 1.0
X-Edinburgh-Scanned: at loire.is.ed.ac.uk with MIMEDefang 2.78, Sophie, Sophos Anti-Virus, Clam AntiVirus
X-IsSubscribed: yes

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 AT inf DOT ed DOT ac DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019