Re: suggested addition to 'date'

From: Giorgos Keramidas <keramida_at_ceid.upatras.gr>
Date: Sat, 12 Aug 2006 23:34:32 +0300
On 2006-08-12 13:08, Julian Elischer <julian_at_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 ;-)
Received on Sat Aug 12 2006 - 18:35:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:58 UTC