mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
e6b78e47f8
PR: ports/92146 Submitted by: Jeffrey H. Johnson <CPE1704TKS@bellsouth.net>
20 lines
886 B
Plaintext
20 lines
886 B
Plaintext
> There doesn't appear to be any decent way to compare the last modified
|
|
> times of files from the shell...
|
|
|
|
Before everybody starts inventing their own names for this, it should be
|
|
noted that V8 already has a program for this, newer(1). It takes two
|
|
filenames as arguments, and exits with status 0 if and only if either
|
|
(a) the first exists and the second does not, or (b) both exist and the
|
|
first's modification time is at least as recent as the second's. Other-
|
|
wise it exits with non-zero status. (The preceding two sentences are
|
|
essentially the whole of the manual page for it.)
|
|
|
|
Relatively few people have V8, but in the absence of any other precedent
|
|
for what this facility should like look, it seems reasonable to follow
|
|
V8's lead:
|
|
|
|
newer file1 file2
|
|
|
|
exit with 0 status if file1 exists and file2 does not, or if file1's last
|
|
modified time is at least as recent as file2's.
|