chanman525
IS-IT--Management
Hey all. I think my eyes are playing tricks on me. I can't seem to figure out how to get this grep to work. Basically I want to get information out of a lot file from today and yesterday and place it in it's own seperate log file. I got my "yesterday's date" calculation done, but the log file where I am placing my information is now showing the previous day. Here are the lines of code I am dealing with...
STARTSHIFT="$LASTMONTH|$LASTDAY|$LASTYEAR"
cat $SUPPORT |grep "$Fdate" > $LOG/support.log
cat $SUPPORT | egrep "$STARTSHIFT >> /$LOG/support.log
Fdate is today's date
Last Month = March
Last day = 19
Last year = 2007.
The log file is shown in a standard "date" format.
Tue Mar 19 15:11:10 EDT 2007
Am I missing something here?
STARTSHIFT="$LASTMONTH|$LASTDAY|$LASTYEAR"
cat $SUPPORT |grep "$Fdate" > $LOG/support.log
cat $SUPPORT | egrep "$STARTSHIFT >> /$LOG/support.log
Fdate is today's date
Last Month = March
Last day = 19
Last year = 2007.
The log file is shown in a standard "date" format.
Tue Mar 19 15:11:10 EDT 2007
Am I missing something here?