From owner-freebsd-stable Mon Apr 30 0:10: 8 2001 Delivered-To: freebsd-stable@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id E8BAD37B424 for ; Mon, 30 Apr 2001 00:10:04 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 30708 invoked by uid 100); 30 Apr 2001 07:10:03 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15085.4043.481499.750988@guru.mired.org> Date: Mon, 30 Apr 2001 02:10:03 -0500 To: Dan Larsson Cc: FreeBSD Stable List Subject: Re: Bug in sort(1) on FreeBSD-4.3 STABLE? In-Reply-To: <20010430085951.B69265-100000@hq1.tyfon.net> References: <20010430085951.B69265-100000@hq1.tyfon.net> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dan Larsson types: > % awk '{print $4}' /var/log/cache/access.log | sort | \ > uniq -c | sort -r | head > 4948 TCP_MEM_HIT/200 > 3963 TCP_MISS/304 > 3666 TCP_MISS/302 > 3640 TCP_REFRESH_HIT/200 > 31988 TCP_MISS/200 > 2973 TCP_MISS/206 > 2503 TCP_HIT/200 > 1799 TCP_MISS/000 > 1563 TCP_REFRESH_MISS/200 > 13568 TCP_IMS_HIT/304 > > This seems to me as some sort of bug. Please correct me if I'm wrong. What seems to be the problem? That the values are sorted alphabetically instead of numerically? If so, you need to tell sort you want a numeric sort with "sort -rn". http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message