Or try this - untested
#/bin/ksh
fhh=`ls -lrt yourfilename|cut -c49-50`
fmm=`ls -lrt yourfilename|cut -c52-53`
hhmm=`date +%H +%M`
fhm=`echo ${fhh}${fmm}`
fhm=`expr "$fhm" + 200`
if [ ${hhmm} -gt ${fhm} ]
then
Do whatever you need to......
fi
You could refine this to check the correct day and month too
and if the file could be over a year old then the year appears in the 49th/50th cols
HTH ;-)
Dickie Bird
db@dickiebird.freeserve.co.uk
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.