I am creating a script that will look through a log file and print the previous days entries. However I do not want the complete line of the entry.
A single line of the log file is as follows:
Aug 30 06:35:08 trnwvltfit1 /usr/lib/snmp/snmpdx: [ID 702911
daemon.error] Agent snmpd appeared dead but responded to ping
I am using the date of the line to determine which lines to print. However, I am only trying to print the parts of the line that are
NOT highlighted in red. I have no knowledge of how long the line may be. How can this be done? So far I have:
Code:
$cat messages.log | grep "Aug 30" |