Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!usc!cs.utexas.edu!natinst.com!hrd769.brooks.af.mil!cynjut.ogisd.ess.harris.com!cynjut.ogisd.ess.harris.com!not-for-mail From: burgess@cynjut.ogisd.ess.harris.com (Dave Burgess) Newsgroups: comp.os.386bsd.misc Subject: Date Comparison function for test(1). Date: 16 Jan 1994 14:58:55 -0600 Organization: Creative Imagineering Lines: 21 Message-ID: <2hc9qf$aq@cynjut.ogisd.ess.harris.com> NNTP-Posting-Host: cynjut.ogisd.ess.harris.com I have made a few changes to the program test to allow date checking for two files in a test(1) in the shell. I have modified lots of the source code in the /usr/src/bin/test directory. In addition to the normal changes to the test.c files, I have also modified the man page to include the three new options. These options are: file1 -nt file2 # File1 is newer than file2 file1 -ot file2 # File1 is older than file2 file1 -sa file2 # File1 is EXACTLY the same age as file2 The way that I added this functionality is not intended to be pretty. I was most interested in keeping the impact of the changes small. There are probably a dozen ways to implment these changes and make them work "better". All I know for sure is that these seem to work just fine for me. -- ------ TSgt Dave Burgess | Dave Burgess NCOIC, USSTRATCOM/J6444 | *BSD FAQ Maintainer Offutt AFB, NE | Burgess@hrd769.brooks.af.mil