🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #142

check for time stamp in ksh

#142
From: Niranjan Chintam
Date: Fri, 24 Jul 1992 19:21
20 lines
938 bytes
Is there a simple script which can check if a particular file has been updated on a give day.

I have written the following script is there any other way to do the same.

#!/usr/bin/ksh

   stamp=`ls -l $filename | awk '$7 ~ /.*:.*/ {print $5$6}'`
   today=`date | awk '{print $2$3}'`
   if [ "$stamp" != "$today" ]; then
      ..........
      ...........
      ...........
   fi


Thanks 


-- Niranjan Chintam                                            chintam@alw.nih.gov
                                               National Inst. of Health, DCRT, CSL
Technical Details
Message-ID: <1992Jul24.192127.15710@alw.nih.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!nih-csl!alw.nih.gov!chintam

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell
Path: arc1-ca.pugleaf.net!sparky!uunet!nih-csl!alw.nih.gov!chintam
From: chintam@alw.nih.gov (Niranjan Chintam)
Subject: check for time stamp in ksh
Message-ID: <1992Jul24.192127.15710@alw.nih.gov>
Sender: postman@alw.nih.gov (AMDS Postmaster)
Organization: National Inst. of Health, DCRT, CSL
Date: Fri, 24 Jul 1992 19:21:27 GMT
Lines: 20