Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2001 02:10:03 -0500
From:      Mike Meyer <mwm@mired.org>
To:        Dan Larsson <dl@tyfon.net>
Cc:        FreeBSD Stable List <stable@freebsd.org>
Subject:   Re: Bug in sort(1) on FreeBSD-4.3 STABLE?
Message-ID:  <15085.4043.481499.750988@guru.mired.org>
In-Reply-To: <20010430085951.B69265-100000@hq1.tyfon.net>
References:  <20010430085951.B69265-100000@hq1.tyfon.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan Larsson <dl@tyfon.net> 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".

	<mike
--
Mike Meyer <mwm@mired.org>			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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15085.4043.481499.750988>