9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] test(1) -older bug?
@ 2013-06-01 21:15 arisawa
  2013-06-01 21:59 ` erik quanstrom
  0 siblings, 1 reply; 9+ messages in thread
From: arisawa @ 2013-06-01 21:15 UTC (permalink / raw)
  To: 9fans

Hello,

How do you think?
I think test is buggy in "older" operation.
the test is from 9front. I have not tried bell-labs test.

term% ls -l
--rw-rw-r-- M 149 arisawa arisawa      3277 Apr  9 23:11 x
--rw-rw-r-- M 149 arisawa arisawa      4555 Apr  9 23:12 y
term% mtime x
 1365516710 x
term% mtime y
 1365516741 y
term% if(test x -ot y) echo OK
OK
term% if(test x -older 1365516741) echo OK
term% if(test x -older 1365516700) echo OK
term%
term% date -n
1370119926
term% dc
1370119926 1365516710 - p
4603216
term% if(test x -older 4603216) echo OK
OK
term% if(test x -older 4703216) echo OK
term%

term% man test
          f -older t True if file f is older than (modified before)
                     time t. If t is a integer followed by the letters
                     y(years), M(months), d(days), h(hours),
                     m(minutes), or s(seconds), it represents current
                     time minus the specified time.  If there is no
                     letter, it represents seconds since epoch.  You
                     can also concatenate mixed units.  For example,
                     3d12h means three days and twelve hours ago.

Kenji Arisawa




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-06-03 13:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-01 21:15 [9fans] test(1) -older bug? arisawa
2013-06-01 21:59 ` erik quanstrom
2013-06-02 21:29   ` cinap_lenrek
2013-06-03  3:44     ` erik quanstrom
2013-06-03 10:47       ` Richard Miller
2013-06-03 11:00         ` arnold
2013-06-03 13:02           ` erik quanstrom
2013-06-03 11:08         ` Jacob Todd
2013-06-03 11:12           ` Richard Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).