GNU bug report logs - #33025
doc: sort: add examples for -R/--random sort

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: 積丹尼 Dan Jacobson <jidanni@HIDDEN>; dated Fri, 12 Oct 2018 16:29:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'doc: sort: add examples for -R/--random sort' from 'Add examples of why one would want to "sort" something "randomly"' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Oct 2018 16:29:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 12 12:29:01 2018
Received: from localhost ([127.0.0.1]:47405 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gB0JA-0007Qh-Ol
	for submit <at> debbugs.gnu.org; Fri, 12 Oct 2018 12:29:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42043)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1gB0J9-0007QV-Ko
 for submit <at> debbugs.gnu.org; Fri, 12 Oct 2018 12:28:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1gB0J3-0003kw-QQ
 for submit <at> debbugs.gnu.org; Fri, 12 Oct 2018 12:28:54 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FROM_EXCESS_BASE64
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39914)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1gB0J3-0003ko-Mv
 for submit <at> debbugs.gnu.org; Fri, 12 Oct 2018 12:28:53 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51652)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1gB0J2-0005bu-Ql
 for bug-coreutils@HIDDEN; Fri, 12 Oct 2018 12:28:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1gB0Ix-0003fe-Og
 for bug-coreutils@HIDDEN; Fri, 12 Oct 2018 12:28:52 -0400
Received: from glow.birch.relay.mailchannels.net ([23.83.209.71]:26698)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1gB0Ix-0003cU-CL
 for bug-coreutils@HIDDEN; Fri, 12 Oct 2018 12:28:47 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id D3E205021D7
 for <bug-coreutils@HIDDEN>; Fri, 12 Oct 2018 16:28:42 +0000 (UTC)
Received: from pdx1-sub0-mail-a70.g.dreamhost.com (unknown [100.96.29.126])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 854885017E9
 for <bug-coreutils@HIDDEN>; Fri, 12 Oct 2018 16:28:42 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from pdx1-sub0-mail-a70.g.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.16.2); Fri, 12 Oct 2018 16:28:42 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Gusty-Bitter: 2e862d3455384498_1539361722656_3374393718
X-MC-Loop-Signature: 1539361722655:185783577
X-MC-Ingress-Time: 1539361722655
Received: from pdx1-sub0-mail-a70.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTP id BFE1C8016C
 for <bug-coreutils@HIDDEN>; Fri, 12 Oct 2018 09:28:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to
 :subject:date:message-id:mime-version:content-type
 :content-transfer-encoding; s=jidanni.org; bh=DnJuWX4HwPCuglM+Bm
 OttgZ1VyI=; b=or7gt/yCDlhMkbTedZSQZs9QP3TREOtwm2VRHvzN+Xki3Ntj+z
 vyNFc3U66N9kHKWN5TjESg5EE3yAZCsDofj42VW4P8agJzaaIfXPc1/vQt7qYT2A
 s8ep6BZYEdm0qlehtumJOvGxKu/O+NXu3qTcjuUTwd15MBjQib5EeC2Bc=
Received: from jidanni.org (220-140-1-63.dynamic-ip.hinet.net [220.140.1.63])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTPSA id 5ECBF80160
 for <bug-coreutils@HIDDEN>; Fri, 12 Oct 2018 09:28:41 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a70
From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@HIDDEN>
To: bug-coreutils@HIDDEN
Subject: Add examples of why one would want to "sort" something "randomly"
Date: Sat, 13 Oct 2018 00:28:32 +0800
Message-ID: <87zhvjnn7z.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: 0
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrvddugdejiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgfgsehtkeertddttdejnecuhfhrohhmpejnnjjnucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqeenucfkphepvddvtddrudegtddruddrieefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehjihgurghnnhhirdhorhhgpdhinhgvthepvddvtddrudegtddruddrieefpdhrvghtuhhrnhdqphgrthhhpeeprehuthhfqdekreeureehiehmpfehnfhiheehsgevkeerpecuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqpdhmrghilhhfrhhomhepjhhiuggrnhhnihesjhhiuggrnhhnihdrohhrghdpnhhrtghpthhtohepsghughdqtghorhgvuhhtihhlshesghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedt
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.9 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.9 (-----)

On (info "(coreutils) sort invocation")

=E2=80=98-R=E2=80=99
=E2=80=98--random-sort=E2=80=99
=E2=80=98--sort=3Drandom=E2=80=99
     Sort by hashing the input keys and then sorting the hash values.
     Choose the hash function at random, ensuring that it is free of
     collisions so that differing keys have differing hash values.  This
     is like a random permutation of the inputs (*note shuf
     invocation::), except that keys with the same value sort
     together...

OK, but you need to mention some examples of why someone would want to
"sort" something "randomly".

OK, I have one:

You have a list of URLs.

You know there are probably duplicates in there, that you want to get
rid of.

But you also don't want to make it look like you have "machine sorted
them." You want them to still look "hand assembled."

So you use sort --random-sort --unique on them!




Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#33025; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 30 Oct 2018 04:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.