jaihelsing
Technical User
thread271-1593376
I am working over a script to scan my log file for current date and if found print the file till end including the found line.
eg:[3/20/14 22:52:25:878 EDT] 0000014a SystemErr R 2014-03-20 22:52:25,878 SEVERE [com.ibm.ws.webcontainer.webapp] - SRVE0293E: [Servlet Error]-[engine]: java.lang.RuntimeException: Failure invoking transactional process 40280ef4-1d44-5120-011d-44518bcd0380.
Like in the above when it comes across 2014-03-20 it sud print the entire lines below it till end including the found line.
could you please suggest an AWK command to do so.
I have tried awk -v mydate="$(date +"%F")" '/mydate/{f=1}f' $FILE > temp.txt
but i am not able to get any output.
I am working over a script to scan my log file for current date and if found print the file till end including the found line.
eg:[3/20/14 22:52:25:878 EDT] 0000014a SystemErr R 2014-03-20 22:52:25,878 SEVERE [com.ibm.ws.webcontainer.webapp] - SRVE0293E: [Servlet Error]-[engine]: java.lang.RuntimeException: Failure invoking transactional process 40280ef4-1d44-5120-011d-44518bcd0380.
Like in the above when it comes across 2014-03-20 it sud print the entire lines below it till end including the found line.
could you please suggest an AWK command to do so.
I have tried awk -v mydate="$(date +"%F")" '/mydate/{f=1}f' $FILE > temp.txt
but i am not able to get any output.