Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Aug 1999 12:25:07 +0300 (IDT)
From:      Nadav Eiron <nadav@cs.Technion.AC.IL>
To:        Graham Wheeler <gram@cequrux.com>
Cc:        hackers@freebsd.org
Subject:   Re: New tests for test(1)
Message-ID:  <Pine.GSO.3.95-heb-2.07.990812122305.27792A-100000@csd>
In-Reply-To: <37B2917A.6CBBC950@cdsec.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.95-heb-2.07.990812122305.27792A-100000>