date: 0551-402 Invalid character in date/time specification. Usage: date [-u] [+"Field Descriptors"] awk: 0602-562 Field $() is not correct. The input line number is 1. The file is test.log. The source line number is 1.
One problem is in the incorrect time format in the date command. Another problem is the incorrect dollar sign in the awk part (to refer to a variable in awk you do not use a dollar sign).
First try the date command and check if what it produces is what you were looking for.
awk: 0602-562 Field $(####<04-Mar-2015 11:10:45 o'clock GMT>-15min) is not correct.
The input line number is 1. The file is test.log.
The source line number is 1.
I am getting the pasted error also it is picking the system's date time not the log file given
and I have to extract the date based on time interval of 15 minutes.This is what I am trying to accomplish. Since I am new to shell scripting, finding it bit tricky<br>
---------- Post updated at 06:32 AM ---------- Previous update was at 06:29 AM ----------
OK, let me rephrase that, is the output of the date command that I posted what you are looking for, or if not, what is the output that you are looking for?
Another question: What OS and version are you using?
See also the comments posted in the duplicate thread Extract data from log which may solve your problem. That thread has now been closed to keep other volunteers from wasting their time trying to help you in that thread.