how to compare file modification time in bourne shell script

Maarten Litmaath maart at cs.vu.nl
Fri Jul 27 07:01:49 AEST 1990


In article <Jul90.102745.21330 at x.co.uk>,
	mike at x.co.uk (Mike Moore) writes:
)...
)     newer() {
)       file=$1
)       set `ls -t $1 $2`   # func args are now changed
)       [ $file = $1 ] && return 0 || return 1
)     }

Equivalently:

     newer() {
       file=$1
       set `ls -t $1 $2`   # func args are now changed
       [ $file = $1 ]
     }

Sic!
--
 "and with a sudden plop it lands on usenet.  what is it? omigosh, it must[...]
   be a new user! quick kill it before it multiplies!"      (Loren J. Miller)



More information about the Comp.unix.questions mailing list