9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa <arisawa@ar.aichi-u.ac.jp>
To: 9fans@9fans.net
Subject: [9fans] test(1) -older bug?
Date: Sun,  2 Jun 2013 06:15:27 +0900	[thread overview]
Message-ID: <0E32432F-8753-4C79-A99C-AC0323B7E353@ar.aichi-u.ac.jp> (raw)

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




             reply	other threads:[~2013-06-01 21:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 21:15 arisawa [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0E32432F-8753-4C79-A99C-AC0323B7E353@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).