home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v8 / text0060.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1003 b 

  1. From: glc@akgua.UUCP (glc)
  2. Date: 30 Nov 86 16:02:09 GMT
  3. Organization: AT&T Technologies/Bell Labs, Atlanta
  4.  
  5. > > There doesn't appear to be any decent way to compare the last modified
  6. > > times of files from the shell...
  7. > Before everybody starts inventing their own names for this, it should be
  8. > noted that V8 already has a program for this, newer(1).  
  9.  
  10. The newer(1) program is a very good solution to the problem.  For
  11. those who (for whatever reason) do not wish to implement it, there
  12. is an alternate method using the "make" command.
  13.  
  14. Make(1) has the "-q" option which causes it to return zero or
  15. non-zero after checking the dependencies.  Here is an example:
  16.  
  17.   if echo "$DEPENDENT:$CONTROL;:" | make -f - -q
  18.     then # The dependent file is up-to-date
  19.     else # The control file is newer that the dependent file
  20.   fi
  21.  
  22. Cheers,
  23.   Lindsay
  24.  
  25. Lindsay Cleveland  (akgua!glc) (404) 447-3909   Cornet 583-3909
  26. AT&T Technologies/Bell Laboratories ... Atlanta, Ga
  27.  
  28.  
  29.  
  30. Volume-Number: Volume 8, Number 61
  31.  
  32.