From owner-freebsd-hackers Thu Aug 12 2:24:17 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.Technion.AC.IL (csa.cs.technion.ac.il [132.68.32.1]) by hub.freebsd.org (Postfix) with ESMTP id 8D2C214E2C for ; Thu, 12 Aug 1999 02:24:06 -0700 (PDT) (envelope-from nadav@cs.technion.ac.il) Received: from csd.cs.technion.ac.il (csd.cs.technion.ac.il [132.68.32.8]) by cs.Technion.AC.IL (8.9.0/8.9.0) with ESMTP id MAA07904; Thu, 12 Aug 1999 12:25:09 +0300 (IDT) Received: from localhost (nadav@localhost) by csd.cs.technion.ac.il (8.9.3/8.9.0) with SMTP id MAA28180; Thu, 12 Aug 1999 12:25:07 +0300 (IDT) X-Authentication-Warning: csd.cs.technion.ac.il: nadav owned process doing -bs Date: Thu, 12 Aug 1999 12:25:07 +0300 (IDT) From: Nadav Eiron X-Sender: nadav@csd To: Graham Wheeler Cc: hackers@freebsd.org Subject: Re: New tests for test(1) In-Reply-To: <37B2917A.6CBBC950@cdsec.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 12 Aug 1999, Graham Wheeler wrote: > Hi all > > I was writing a script yesterday, and I wanted to have a test to compare > the modification time of two files. test(1) doesn't have the ability to > do this. In the end I worked around this by using make(1), but it set me > thinking - wouldn't it be a good idea to add some new tests to test(1), > to compare files based on criteria like size or modification date? A suggestion for another way to implement such a test: ls -1t file1 file2 | head -1 will give you the newest of the two... That's what I use when I need to do such tests. I guess it's easier and faster than make. > > Anyone else think this is a good idea? > > -- > Dr Graham Wheeler E-mail: gram@cequrux.com > Cequrux Technologies Phone: +27(21)423-6065/6/7 > Firewalls/Virtual Private Networks Fax: +27(21)24-3656 > Data/Network Security Specialists WWW: http://www.cequrux.com/ > > Nadav To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message