Hello Team,
I have a script which will grep for a time from a file. I have following code to grep for a time in a file.
node=`hostname`
current_date=`date`
file11=weblogic.log
next_date=`date '+%b %e, %Y'`
next_date_time11=`grep -i "${#next_date}" ${file11}| tail -1 | awk '{print $4}'`
When I do echo to variable next_date_time11 it returns null value.
I am trying to get time from the below file. I am unable to do that.
Kindly help
Below is the file content :-
<May 2, 2012 1:14:50 PM MEST> <Error> <HTTP> <BEA-101214> <Included resource or file "/eMatrix/jsp/mars/report/optionFragments/baseline_options.jsp" not foun
d from requested resource "/eMatrix/jsp/mars/report/report.jsp".>
submitMode=viewreport
<May 2, 2012 1:17:53 PM MEST> <Error> <HTTP> <BEA-101214> <Included resource or file "/eMatrix/jsp/mars/report/optionFragments/baseline_options.jsp" not foun
d from requested resource "/eMatrix/jsp/mars/report/report.jsp".>
submitMode=viewreport