bug-bash
[Top][All Lists]
Advanced

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

bash's test and GNU test give different results [if file not there]


From: Dan Jacobson
Subject: bash's test and GNU test give different results [if file not there]
Date: 22 Feb 2002 01:18:07 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> "Dan" == Dan Jacobson <address@hidden> writes:

Dan> $ test non_existant_file -ot . && echo preposterous
Dan> preposterous
Dan> $ /usr/bin/test non_existant_file -ot . && echo preposterous
Dan> $ test . -nt non_existant_file  && echo preposterous
Dan> preposterous
Dan> $ /usr/bin/test . -nt non_existant_file  && echo preposterous
Dan> $ echo $BASH_VERSION
Dan> 2.05.0(1)-release

>>>>> "Chet" == Chet Ramey <address@hidden> writes:

>> Erm, so did I find a big bug or not?  Thanks.

Chet> I don't think so.  Non-existent files have their mtimes set to 0.

OK, then what are we going to do about the different results test -ot, -nt
give for bash's test vs. the GNU test?

Shall I repost to gnu.utils.bug instead?

I mean if I ask if I'm older than Bob Jenxz, I want you only to tell
me yes if yes.  I provide many different codes for different shades of
"not yes".  Ok, bad example.  Anyway, a messed up test could cause a
disaster... let's at least get GNU & bash versions to agree.
-- 
http://www.geocities.com/jidanni/ Taiwan(04)25854780



reply via email to

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