On Wednesday, 11 March 2020 at 23:34:46 -0400, Steve Nickolas wrote:
On Thu, 12 Mar 2020, Greg 'groggy' Lehey
wrote:
-S isn't POSIX. And to implement it without
an option would mean
removing -h.
-h is a gnuism, isn't it?
It might have originated there, but then I would expect it to be spelt
'--produce-human-readable-output'. I haven't been able to establish
from the FreeBSD sources or commit logs when it was introduced. It
would clearly have been a reimplementation.
So it is! This was the first option that I wanted to add, back when I
still had practice wheels. I asked my mentor, and he said "not the
Unix way", so I let it be. Then Wes Peters came up with the idea, and
I thought he committed it, but it seems that it ultimately came from
Kostas Blekos in 2005, based on the same feature on NetBSD and
OpenBSD. I wonder when it made it to POSIX.
As I mentioned
earlier, -t can't be done by a filter without
significantly modifying the timestamp output. That was my rationale
for the -D option, which allows sorting by an external filter.
Understandable.
Honestly if the date format weren't standardized as it were, I would've
standardized on "yyyy-mm-dd,mm:ss" - which wouldn't need special
processing in order to pump into sort(1).
Yes, that was one of the possibilities I thought of. Another obvious
one was time_t, which is even easier to process. And then there's ISO
8601. That's why it didn't take me long to decide "do it *your* wayâ
with the -D option.
Greg
--
Sent from my desktop computer.
Finger grog(a)lemis.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed. If your Microsoft mail program
reports problems, please read
http://lemis.com/broken-MUA