From mboxrd@z Thu Jan 1 00:00:00 1970 From: arisawa Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <0E32432F-8753-4C79-A99C-AC0323B7E353@ar.aichi-u.ac.jp> Date: Sun, 2 Jun 2013 06:15:27 +0900 To: 9fans@9fans.net Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: [9fans] test(1) -older bug? Topicbox-Message-UUID: 5ea34424-ead8-11e9-9d60-3106f5b1d025 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