From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QMLqF-0006wd-W3 for garchives@archives.gentoo.org; Tue, 17 May 2011 15:05:48 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ABB0B1C17B; Tue, 17 May 2011 15:04:17 +0000 (UTC) Received: from km30706.keymachine.de (ns.km30706.keymachine.de [87.118.116.62]) by pigeon.gentoo.org (Postfix) with ESMTP id 2ABF71C17B for ; Tue, 17 May 2011 15:04:16 +0000 (UTC) Received: (qmail 3519 invoked from network); 17 May 2011 17:01:34 +0200 Received: from dslb-092-075-233-130.pools.arcor-ip.net (HELO grusum.endjinn.de) (92.75.233.130) by dh.comunicandonos.org with (DHE-RSA-AES256-SHA encrypted) SMTP; 17 May 2011 17:01:34 +0200 Received: by grusum.endjinn.de (Postfix, from userid 500) id 251FA5A369; Tue, 17 May 2011 16:30:21 +0200 (CEST) Date: Tue, 17 May 2011 16:30:20 +0200 From: David Haller To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] is a nice "place" :-D Message-ID: <20110517143020.GA27292@grusum.endjinn.de> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <4DD1AEC8.5010501@earthlink.net> <201105170133.39864.alan.mckinnon@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <201105170133.39864.alan.mckinnon@gmail.com> Organization: What? User-Agent: Mutt/1.5.20 (2009-06-14) X-Archives-Salt: X-Archives-Hash: 4b561aa4d8e04536e08bc42a93a5682e Hello, On Tue, 17 May 2011, Alan McKinnon wrote: >grep "GET /Tmp/Linux/G" | /var/log/apache2/access_log | grep-v | \ >awk '{print $1}' | sort | uniq | wc useless use of ... awk '/GET \/Tmp\/Linux\/G/{ips[$1]++;}END{print length(ips);}' \ /var/log/apache2/access_log I add each access to ips[] in case you'd want to print that to, e.g. by using END { for( i in ips ) { print i ":" ips[i] " accesses"; } print length(ips) " unique IPs total"; } as the "END" block. HTH, -dnh -- Any research done on how to efficiently use computers has been long lost in the mad rush to upgrade systems to do things that aren't needed by people who don't understand what they are really supposed to do with them. -- Graham Reed, in asr