NetBSD Problem Report #59647
From www@netbsd.org Wed Sep 10 13:44:21 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 3550E1A923C
for <gnats-bugs@gnats.NetBSD.org>; Wed, 10 Sep 2025 13:44:21 +0000 (UTC)
Message-Id: <20250910134419.D2F8C1A923D@mollari.NetBSD.org>
Date: Wed, 10 Sep 2025 13:44:19 +0000 (UTC)
From: uwe@stderr.spb.ru
Reply-To: uwe@stderr.spb.ru
To: gnats-bugs@NetBSD.org
Subject: document sort(1) peculiarities
X-Send-Pr-Version: www-1.0
>Number: 59647
>Category: standards
>Synopsis: document sort(1) peculiarities
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jkoshy
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 10 13:45:00 +0000 2025
>Last-Modified: Thu Sep 11 15:48:23 +0000 2025
>Originator: Valery Ushakov
>Release: NetBSD 10.1
>Organization:
>Environment:
>Description:
Cf. bin/51726 or src/bin/sh/mkoptions.sh revision 1.8:
date: 2024-04-17 02:30:19 +0300; author: christos; state: Exp;
lines: +3 -3; commitid: 2c7j1Tx6qooqqq6F;
Be more explicit with sort fields to produce consistent results with
gnu sort (Jan-Benedict Glaw)
Our sort behaves differently w.r.t. ordering options (-b, -d, ...),
that can be specified either "globbaly" or as part of "keydef" (what
our manual page calls kstart, kend).
I am still not sure from the description, if it's only -b that is
special in our sort, or all of the ordering options. The man page
seems to imply the former, but a quick RTFS seems to imply the latter
at a (very) quick glance.
A manual page should be a reference for the proverbial desperate
sysadmin at 3am Saturday, not an exegetical exercise.
>How-To-Repeat:
"Explain like I'm five" src/bin/sh/mkoptions.sh revision 1.8:
date: 2024-04-17 02:30:19 +0300; author: christos; state: Exp;
lines: +3 -3; commitid: 2c7j1Tx6qooqqq6F;
>Fix:
Write some prose for the sort(1) man page that explains how ordering
options are actually applied and how that behavour is different from
the posix/gnu treatment of those same options. Including CAVEATS
section.
Not _directly_ related, but an EXAMPLES section that demonstrates
relevant material with specific cases and not abstract prose that
sounds like it's from a medieval Zenzizenzizenzic treatise badly
translated from Latin could be handy...
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: standards-manager->jkoshy
Responsible-Changed-By: jkoshy@NetBSD.org
Responsible-Changed-When: Thu, 11 Sep 2025 15:48:23 +0000
Responsible-Changed-Why:
Taking a look at this bug.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.