From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 15 03:54:01 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7876916A4BF for ; Mon, 15 Sep 2003 03:54:01 -0700 (PDT) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA4F543F3F for ; Mon, 15 Sep 2003 03:54:00 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from mail.robbins.dropbear.id.au (210.50.204.238) by smtp02.syd.iprimus.net.au (7.0.018) id 3F4C083E00371E5E for freebsd-hackers@freebsd.org; Mon, 15 Sep 2003 20:53:58 +1000 Received: by mail.robbins.dropbear.id.au (Postfix, from userid 1000) id 31557C8BA; Mon, 15 Sep 2003 20:53:57 +1000 (EST) Date: Mon, 15 Sep 2003 20:53:56 +1000 From: Tim Robbins To: freebsd-hackers@freebsd.org Message-ID: <20030915105356.GA11926@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: A new sort utility X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2003 10:54:01 -0000 The recent thread about BSD-licensed replacements for GNU utilities in OpenBSD has prompted me to share my reimplementation of the sort(1) utility. Most of the code is new. sort.1 and obsolete.c came from 4.4BSD via NetBSD. I've been using it instead of GNU sort on my systems for the past few months, I've run a few test suites on it, and I think most of the bugs have been ironed out now. If anyone's interested, it's available here: http://people.freebsd.org/~tjr/sort1.tar.gz It's not quite as fast as the GNU or 4.4BSD sort implementations, but it's BSD-licensed, follows the normal BSD coding conventions, has better locale support than 4.4BSD's (and perhaps GNU's, too), and I believe it's much less buggy than the 4.4BSD sort (sort -n is horribly broken in 4.4BSD's, see the NetBSD PR database for an example). It attempts to conform to the POSIX standards; by default it follows 1003.2-1992, removing the CFLAGS+=-DOBSOLETE line in the Makefile will make it follow 1003.1-2001. Comments/patches are welcome. As the "History" suggestion of the manual page suggests, my plan is to get this in to FreeBSD 6, along with replacements for some other GNU tools. I have a diff(1) replacement (with sdiff support) in the works, among other things. Tim