bug-bash
[Top][All Lists]
Advanced

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

Re: bash conditional expressions


From: Chet Ramey
Subject: Re: bash conditional expressions
Date: Mon, 15 Nov 2021 09:23:17 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1

On 11/12/21 4:36 AM, Mischa Baars wrote:

Could you please restore the Fedora 32 behaviour? Someone must have read
the bash manual a little too precise, because now the statement only
returns true when a 'touch -a test' is given and not when a 'touch -am
test' is given.

As I understand it, -N stands for NEW and therefore should return a true
when either a 'touch -a test' or a 'touch -am test' is given.

Why do you think `touch -am', which sets the atime and mtime to the same
value, should make -N true?

If test -N is a strict test that mtime > atime, it is working correctly
and you have managed to defeat it by setting atime == mtimne.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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