home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: 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
-
- 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
-