![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| replacing new lines in all files of a directory containing old lines | rooster005 | Shell Programming and Scripting | 1 | 03-25-2008 03:38 PM |
| How to delete first 5 lines and last five lines in all text files | ragavendran31 | Shell Programming and Scripting | 10 | 02-21-2008 07:58 AM |
| Help!! Need script to read files and add values by lines... | dhuertas | Shell Programming and Scripting | 3 | 09-16-2007 12:14 AM |
| need help--script to filter specific lines from multiple txt files | I-1 | Shell Programming and Scripting | 7 | 02-16-2007 08:42 PM |
| grepping lines out of files | mariner | UNIX for Advanced & Expert Users | 2 | 09-24-2004 09:12 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Script lines of a Log Files
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" | |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|