tech-userlevel archive

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

Re: test -nt and -ot operators



    Date:        Fri, 14 Jul 2017 18:55:32 +0200
    From:        Edgar =?iso-8859-1?B?RnXf?= <ef%math.uni-bonn.de@localhost>
    Message-ID:  <20170714165531.GM50210%trav.math.uni-bonn.de@localhost>

  | I can't make sense out of the ksh bevaviour.

It is ...

  | zsh's -nt/-ot seem to be designed to behave
  | exactly inversely to each other even in the corner cases?

the same for ksh I believe.   That's why it is file2 that must exist in
the -ot case.

FreeBSD actually implement -ot be swapping the file1/2 args, and then
calling -nt.   (ksh might as well, at least in some ksh versions.)

I think in all cases they are inverses (which more or less makes one of
them redundant and unnecessary, but they are too well established, even
if not standardised, to delete one.)

kre

ps: I did also see the "document it and leave the code alone" part of the 
reply.



Home | Main Index | Thread Index | Old Index