Need script to validate file according to date

Hi All,

I am very new to unix and just started to work with unix and shell scripting.I have a query anyone help would be much appreciated

I am using sun solaris OS
I want to validate a file according to its date and if validate successful then it would write the file name,size,date and time only in a log file

For example

suppose a file

-rw-r--r-- 1 xxxxxx xxxx 2400390 Sep 10 08:50 test.dat

this file actually received on every monday of a week so i want a script that check whether it is of current date or not if it is the it would appear in my log file otheriwse not.

But when / how will test? Testing today to see if the file is current is not the same as testing on monday...

Hi,

Thanks for your prompt response.

I mean if the script execute today it should not take that file in my log file.And if that script execute on monday it should appear in my log file.

I want that script to run daily so that i can validate number of such files.

So just starting with unix i just want to get through a single file date validation.

A script that runs daily is a batch launch by a scheduler like cron... if so where is your script going to get the name of the file it needs to compare the date?