Date: Thu, 29 Nov 2001 11:47:33 -0500 From: "Brian F. Feldman" <green@FreeBSD.ORG> To: "Andrey A. Chernov" <ache@nagual.pp.ru> Cc: "David O'Brien" <obrien@FreeBSD.ORG>, "Brian F. Feldman" <green@FreeBSD.ORG>, Mark Murray <mark@grondar.za>, Sheldon Hearn <sheldonh@starjuice.net>, arch@FreeBSD.ORG Subject: Re: BSD sort vs GNU sort. Message-ID: <200111291647.fATGlXK61006@green.bikeshed.org> In-Reply-To: Your message of "Thu, 29 Nov 2001 19:27:52 %2B0300." <20011129162751.GD8233@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
"Andrey A. Chernov" <ache@nagual.pp.ru> wrote: > On Thu, Nov 29, 2001 at 08:19:01 -0800, David O'Brien wrote: > > On Thu, Nov 29, 2001 at 07:13:23PM +0300, Andrey A. Chernov wrote: > > > If you want sufficient test for single-byte sorting & collation, tr= y to > > > use ru_RU.KOI8-R encoding. > > = > > I am not sure most of us could do that well. Can you test BSD sort a= nd > > report back? > = > I don't have it in hand. = > = > The test is simple: > = > 1) Create the file with single character per line from \000 to \377 > = > 2) Sort it using = > LC_CTYPE=3Dru_RU.KOI8-R gnu_sort < file > (I mean _patched_ GNU sort we currently have in sources, not original = > one which not support collation) > = > 3) Sort it using = > LC_CTYPE=3Dru_RU.KOI8-R bsd_sort < file > = > 4) Compare results. {"/home/green/netbsd-sort/basesrc/usr.bin/sort"}$ ruby File.open('f', 'w') {|f| 1.upto(255) {|n| f.puts(n.chr) if n.chr !~ /^[[:cntrl:]]/ } } {"/home/green/netbsd-sort/basesrc/usr.bin/sort"}$ ls -l f -rw-r--r-- 1 green green 446 29 =CE=CF=D1 11:46 f {"/home/green/netbsd-sort/basesrc/usr.bin/sort"}$ md5 f MD5 (f) =3D 60369ee3857999b452c560c7a8256734 {"/home/green/netbsd-sort/basesrc/usr.bin/sort"}$ sort f | md5 3c31168a9159c2df8d8ce56370579c58 {"/home/green/netbsd-sort/basesrc/usr.bin/sort"}$ ./sort f | md5 60369ee3857999b452c560c7a8256734 -- = Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111291647.fATGlXK61006>