Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2005 03:35:52 +0100
From:      markzero <mark@darklogik.org>
To:        freebsd-questions@freebsd.org
Subject:   epoch->calendar date(1) wizardry
Message-ID:  <20050530023552.GA63697@logik.ath.cx>

next in thread | raw e-mail | index | archive | help

--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

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

=2E.and I want to print it in a standard UK format, such as:

  +%H:%M:%S %d/%m/%y

Anybody?

(before anybody screams Perl or C, I would rather stick to plain
 old sh for this).

Thanks,
Mark

--=20
PGP: http://www.darklogik.org/pub/pgp/pgp.txt
B776 43DC 8A5D EAF9 2126 9A67 A7DA 390F DEFF 9DD1

--oyUTqETQ0mS9luUI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iQIVAwUBQpp8B6faOQ/e/53RAQofcw/+InlF8EWVGsVmiFiYvdk/Pp862bOtwsDM
AkK07aAptnB5gfk/u8YYXIS5FSa+9euwGA5SuNKuiKXqBK1aJOUToPEcEa0slIS2
USkaePT6vE1BuHqo4hHYqrWKxTwLE71dR3XPSnWoMIKhImtU6dtRkn/4/WZNcgI4
7VxMDFwVBe/BBWQUpk/XB8QRLsSbe+WuFcEkSYXznERAM9kDDQgs61gVimw2RMMk
JWWSTfjdhruaF4Nlv+4Wvj32HgizJKEyVLr/l+NAtLRBdXU+c5Sf20HkZKAMaQZ9
ipwHVKWwFV5CiQzoEfay02prVO3xlmYQFAahn764qCwdeKUAfF39O/ij77dnEVRk
3IonJu2V9xVJ9LiH7eHob1LCQ86VE5dNZaKpc+G8EaCWW9tBOXlv0jXKioXl5Ysb
RTI55eFLCgjr8oqprL7cuVlR5JzlPMStgCfz0145iFs4Jqp3Uaqn6XkZlk6Q1lxF
XQvJ6Z037w9dodaVuDV8UDrYKGywDZlwcQP1bFiEYOlNsIyhPklRqlGXtoODrqUt
BpqacbIltN6gnjMYRiHwjPuDmqIoS31omPvLxkczvi2Xd3/7f0RnEFWEgf6UX6Fq
C8KCtQFPuQHgXxp3F6YtgQlaM5iK9SeP6UZiik+UjZsZzF6AbPhwcSBIjTwPt7zk
BE9oy6uW94A=
=wwES
-----END PGP SIGNATURE-----

--oyUTqETQ0mS9luUI--



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