![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep latest file based on date. | lweegp | Shell Programming and Scripting | 12 | 04-03-2009 03:10 AM |
| Grep date from ls -l | GenMen | Shell Programming and Scripting | 1 | 05-01-2008 09:53 PM |
| grep time and date | ayhanne | Shell Programming and Scripting | 8 | 01-06-2008 09:12 AM |
| grep using date format | ali560045 | Shell Programming and Scripting | 8 | 12-11-2007 06:39 PM |
| ls -l | grep $date (failing) | yongho | Shell Programming and Scripting | 1 | 08-01-2005 03:30 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Sponsored Links | ||
|
|