Date: 26 Sep 2002 10:34:05 +0100 From: Nick Hilliard <nick-list@netability.ie> To: current@freebsd.org Subject: Re: Who broke sort(1) ? Message-ID: <1033032846.93210.69.camel@pancake.netability.ie>
next in thread | raw e-mail | index | archive | help
--=-/ijy1n8wvBOru8MAQdi4 Content-Type: text/plain Content-Transfer-Encoding: 7bit > >It's not like people didn't have nine years' advance warning to fix > >their scripts. > > When's the first time the FreeBSD sort(1) man page mentioned that this > syntax was deprecated? Can we at least start from there? The man page in 4.x notes that "-k" is an alternative rather than the recommended syntax. Moving something from being officially recommended syntax in 4.x to dropping the syntax completely in 5.x is verging on gratuitous breakage, and is going to confuse and piss off a lot of users. In fact, why does somebody not modify the man page for -stable to note that it is now deprecated usage, and please use "-k" instead? Should this change even make it into 4.7? After all, the sooner the better, and if 5.0 is going to be released in 6 weeks, that's not much warning. I'm all for the making the change in a controlled manner, but let's not lose sight of the fact that FreeBSD is supposedly a functional operating system, not a dysfunctional one. Tim Kientzle's suggestion is a good compromise, and although it may cause some peculiar behaviour in edge-case situations, it would be a lot better than the dropping the syntax without warning from one major version to the next. Nick (off to fix some _POSIXLY_VERBOTEN scripts, grumble....) --=-/ijy1n8wvBOru8MAQdi4 Content-Disposition: attachment; filename=sort.1.diffs Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; name=sort.1.diffs; charset=ISO-8859-15 --- sort.1.orig Mon Sep 10 12:10:30 2001 +++ sort.1 Thu Sep 26 10:32:04 2002 @@ -5,7 +5,7 @@ .SH SYNOPSIS .B sort [\-cmus] [\-t separator] [\-o output-file] [\-T tempdir] [\-bdfiMnr] -[+POS1 [\-POS2]] [\-k POS1[,POS2]] [file...] +[\-k POS1[,POS2]] [file...] .br .B sort {\-\-help,\-\-version} @@ -150,15 +150,19 @@ .I \-c option, check that no pair of consecutive lines compares equal. .TP -.I "+POS1 [\-POS2]" +.I "\-k POS1[,POS2]" +An alternate syntax for specifying sorting keys. Specify a field within each line to use as a sorting key. The field consists of the portion of the line starting at POS1 and up to (but not including) POS2 (or to the end of the line if POS2 is not given). -The fields and character positions are numbered starting with 0. +The fields and character positions are numbered starting with 1. .TP -.I "\-k POS1[,POS2]" +.I "+POS1 [\-POS2]" An alternate syntax for specifying sorting keys. -The fields and character positions are numbered starting with 1. +The fields and character positions are numbered starting with 0. +This syntax is now officially deprecated because it conflicts with +the POSIX 1003.2 standard. The syntax will be dropped in a future +release of FreeBSD. .PP A position has the form \fIf\fP.\fIc\fP, where \fIf\fP is the number of the field to use and \fIc\fP is the number of the first character --=-/ijy1n8wvBOru8MAQdi4-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1033032846.93210.69.camel>