Date: Mon, 14 Aug 2006 14:21:07 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-current@FreeBSD.ORG Subject: Re: suggested addition to 'date' Message-ID: <200608141221.k7ECL7JJ082305@lurza.secnetix.de> In-Reply-To: <20060812034008.GC80768@gothmog.pc>
next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas wrote: > Sam Leffler wrote: > > Julian Elischer wrote: > > > At various times I've wanted to add timestamps to logfiles as they are > > > generated.. > > > > > > usually this has involved perl or something to do it. > [...] > Using Perl and ``Time::HiRes qw(gettimeofday)'' is the best trick I've > found so far for this sort of thing :-/ In the "good old days" when FreeBSD still hat gnu awk as /usr/bin/awk, it was pretty trivial to do: ls | awk '{print strftime("%+: ") $0}' Unfortunately, our "shiny new" awk doesn't have strftime() anymore. (One of the reasons why I always install gnu awk from ports and let it override the crippled /usr/bin/awk.) I don't think it deserves bloating date(1) or even a completely new tool. There are tools which can do the job easily and efficiently (e.g. gnu awk, see above). Just my 2 cents. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "C is quirky, flawed, and an enormous success." -- Dennis M. Ritchie.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608141221.k7ECL7JJ082305>