suggested addition to 'date'
Garance A Drosehn
gad at FreeBSD.org
Thu Aug 17 18:05:32 UTC 2006
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
More information about the freebsd-current