I have a log that looks like this:
####<Sep 16, 2014 6:12:45 PM EST> <Notice> <StdErr> <myserver> <myinstance> <[ACTIVE] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1410913515898> <BEA-000000> <at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)>
####<Sep 16, 2014 9:45:08 PM EST> <Notice> <StdErr> <myserver> <myinstance> <[ACTIVE] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1410913515898> <BEA-000000> <at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)>
####<Sep 16, 2014 10:27:26 PM EST> <Notice> <StdErr> <myserver> <myinstance> <[ACTIVE] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1410913515898> <BEA-000000> <at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)>
####<Sep 16, 2014 11:25:16 PM EST> <Notice> <StdErr> <myserver> <myinstance> <[ACTIVE] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1410913515898> <BEA-000000> <at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)>
Let's say the time is currently 11:26 PM EST. I only want to get entries written in the last hour. I've previously used something like this:
nawk -F "<" -v MyDate=`TZ=MYT+6 date "+%b %d, %Y%l:%M:%S %Z"` ' {if ($2 > MyDate) print $2}'
but i'm getting the following error when attempting to run this:
nawk: syntax error at source line 1
context is
>>> 16, <<<
nawk: bailing out at source line 1
How can I list the entries that were written in the last hour using the Solaris tools (NOT GNU)?