Date: Sat, 12 Aug 2006 23:34:32 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Julian Elischer <julian@elischer.org> Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, current@freebsd.org Subject: Re: suggested addition to 'date' Message-ID: <20060812203432.GA5007@gothmog.pc> In-Reply-To: <44DE3531.7040308@elischer.org> References: <3892.1155412387@critter.freebsd.dk> <44DE3531.7040308@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2006-08-12 13:08, Julian Elischer <julian@elischer.org> wrote: > Poul-Henning Kamp wrote: > > Why would you need to include "the whole of 'date'" ? Have you > > never heard of strftime(3) ? > > Of course but I think it makes more sense to add the ability > for date to be able to put the date onto a stream than to write > a whole new program for it, and date does extra work not > included in strftime() that it would be nice to have. > > It could be said that adding a strftime() to 'cat' as an option > is equally possible but that would be much more disruptive than > adding filterring to date, as cat is not line oriented, Exactly. Seeing that cat is not line-oriented I wrote at least two different filters at various times, which were inspired by the tinderbox log format. The one was the Perl line-based one which I posted upthread. The other one was in plain C, and is attached. It doesn't do the fancy date-conversion stuff that date(1) can do, but please feel free to rip it off if you find anything useful in there for the date(1) patch. > BTW. I agree that the last patch I gave was overly complicated > and a much simpler one is possible.. Basically, Giorgos's > suggested patch is pretty close to being right. Or we can adapt this until it is right ;-) --wRRV7LY7NUeQGEoC--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060812203432.GA5007>