help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should -et be available?


From: Maroloccio
Subject: Re: Should -et be available?
Date: Mon, 25 May 2020 18:52:53 -0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.8.1


On 25/05/2020 13:36, Andreas Kusalananda Kähäri wrote:
On Mon, May 25, 2020 at 03:35:57PM +0200, Quentin L'Hours wrote:
On 25/05/2020 15:11, Peng Yu wrote:
But if your point is that -et should not be added. Then, why having
-eq (as -le -ge implies -eq)?

Therefore, I think -eq should be added to bash to make it complete in
timestamp test.

It's probably because -eq is useful in many scenarios.
But on the other hand testing that two files have the exact same timestamp
seems very specific, whereas checking for instance if a file is outdated
compared to another one is very common.

Things that are only useful in very specific situations and that can be
achieved with simple workarounds (-e + -ot + -nt here) have very little
chance to be added (even if it seems trivial) for the usual reasons:
development time, maintenance, increased complexity etc.

I can't for the life of me think of an actual real world use case for
-et, honestly.  There's the non-standard -ef which *does* have some use,
albeit uncommon ones (like testing whether a symblic link points to a
particular regular file, or if two symbolic links point to the same
file, etc.)

Peng Yu, what's your actual use case?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]