Re: suggested addition to 'date'

From: Garance A Drosehn <gad_at_FreeBSD.org>
Date: Thu, 17 Aug 2006 14:04:45 -0400
At 6:01 PM -0700 8/16/06, Julian Elischer wrote:
>Ricardo Nabinger Sanchez wrote:
>>
>>My suggestion, if you happen to reconsider about having
>>it only for your local usage, is to instead use a long
>>option, like "--stamp" or "--timestamp".  -s collides
>>with GNU date set option, and people sometimes forget
>>if they're in a BSD or GNU box (I do).
>>
>>I'd have sent this mail before, but I got shaky as I'm
>>new here and because of the huge pressure for not
>>committing such addition.
>
>I wouldn't call it huge pressure.. it was 2 for,
>(now 3), 3 against and about 200 who couldn't care.

After thinking about this awhile, I'd say that I'm mildly
against it.  The `date' command has never been a filter,
and I don't see any reason that this feature needs to be
in the `date' command as opposed to some other command.

>It's just that the ney sayers always scream loudest.

I'm certainly not screaming.  But if we were to add this
option somewhere, then des's suggestion of:

   It would make far more sense to add a date option
   to cat(1), which already has a line-numbering option.

does seem very reasonable to me.  `cat' already has
several options which cause data to be filtered as it
is copied.  The only trick is that you also want to
specify the format to use for the timestamp.  So, just
have the new parameter require a strftime() string:

     cat -D "%Y-%m%d-%H%M: "

And maybe include a reference to the `cat' command in
the man page for the `date' command, just so people
realize that the option is available.

-- 
Garance Alistair Drosehn     =               drosehn_at_rpi.edu
Senior Systems Programmer               or   gad_at_FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA
Received on Thu Aug 17 2006 - 16:05:32 UTC

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