|
grep for date in file
Hi,
i have a script that stores the date in a variable as follows:
DATESTAMP=`date +"%m%d%Y"`
I also have another file called HOLIDAYFILE which stores all of our holidays as follows:
01/01/2007
07/04/2007
What i need to do is use the grep statement in my script to see if DATESTAMP is in the HOLIDAYFILE and store that in another variable, let's say HOLIDAY, and if HOLIDAY has a value then do nothing and exit the script, otherwise proceed with the code.
anyone have a good grep statement that would do this?
thanks
scott
|