From owner-freebsd-questions@FreeBSD.ORG Mon May 30 02:44:47 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DC6D16A41C for ; Mon, 30 May 2005 02:44:47 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CA4E43D53 for ; Mon, 30 May 2005 02:44:47 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j4U2guna032122; Sun, 29 May 2005 21:42:56 -0500 (CDT) (envelope-from dan) Date: Sun, 29 May 2005 21:42:56 -0500 From: Dan Nelson To: markzero Message-ID: <20050530024256.GA5689@dan.emsphone.com> References: <20050530023552.GA63697@logik.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050530023552.GA63697@logik.ath.cx> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: freebsd-questions@freebsd.org Subject: Re: epoch->calendar date(1) wizardry X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 02:44:47 -0000 In the last episode (May 30), markzero said: > How may one pretty print an epoch timestamp using date(1)? The date > manual page gives me a headache. > > Essentially, I have the timestamp in a file: > > $ cat t > 1117417465 > > ..and I want to print it in a standard UK format, such as: > > +%H:%M:%S %d/%m/%y date -r $(cat t) +"%H:%M:%S %d/%m/%y" -- Dan Nelson dnelson@allantgroup.com