From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JJoKI-0007GY-R0 for garchives@archives.gentoo.org; Tue, 29 Jan 2008 11:08:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90235E0542; Tue, 29 Jan 2008 11:08:23 +0000 (UTC) Received: from mail.ukfsn.org (mx1.ukfsn.org [77.75.108.10]) by pigeon.gentoo.org (Postfix) with ESMTP id 6B6F4E0542 for ; Tue, 29 Jan 2008 11:08:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.ukfsn.org (Postfix) with ESMTP id 6A671DED6E for ; Tue, 29 Jan 2008 11:12:40 +0000 (GMT) Received: from mail.ukfsn.org ([127.0.0.1]) by localhost (smtp-filter.ukfsn.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mqDIspgB3Bgx for ; Tue, 29 Jan 2008 11:12:40 +0000 (GMT) Received: from wstn.prhnet (unknown [78.32.181.186]) by mail.ukfsn.org (Postfix) with ESMTP id 3C75FDED08 for ; Tue, 29 Jan 2008 11:12:40 +0000 (GMT) From: Peter Humphrey Organization: at home To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Time format in log files Date: Tue, 29 Jan 2008 10:52:18 +0000 User-Agent: KMail/1.9.7 References: <200801272154.25376.michaelkintzios@gmail.com> <200801281021.47081.peter@humphrey.ukfsn.org> <20080128164329.GA9712@venus> In-Reply-To: <20080128164329.GA9712@venus> 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-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801291052.18907.peter@humphrey.ukfsn.org> X-Archives-Salt: 9706498e-18e7-4b15-b654-1a77c04f61ec X-Archives-Hash: 28902bae15c11d2a74f9d41969d9d170 On Monday 28 January 2008 16:43:29 Jan Seeger wrote: > perl -npe '/^\[(\d+)\]/; @times = localtime $1; $times[4]++; > $times[5]+=1900; s/\[\d+\]/$times[2]:$times[1] > $times[3].$times[4].$times[5]/;' > > Just pipe your log through that and you will get beautiful (european) > dates instead of timestamps. > use perl or die()^^. s/or/and/ :-) > I got it using the following jumbled one-liner: Nope. I pasted that into a file called pipe, and it still returns Unix time stamps, thus: $ grep completed /var/log/emerge.log | tail | ./pipe 1201599475: ::: completed emerge (1 of 86) kde-base/arts-3.5.8 to / ... Next? :-) -- Rgds Peter -- gentoo-user@lists.gentoo.org mailing list