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: [EMAIL PROTECTED]
> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message