I've got a particular log file line I'm trying to parse out and having some difficulty with.
Environment: Debian Linux, Bash Shell
I have a file that contains a record similar to this on each line
I'm starting to work on a script that parses this data, I'll take the results using a loop likely and format it neatly into an html table for easy viewing.
The file contains lines built from another script that greps through every log file in that directory and finds the lines matching 'completed' - I can re-write/edit that script if need be.
I really only care about the date/time "Thu Oct 14 02:31:01 EDT 2010" and the message "Completed export_job for 20101014" and even the "for 20101014" isn't necessary.
I've been scratching my head over this for the better part of the afternoon.
I really couldn't find a character to use awk to split the line up in any way that made sense, I initially thought I could use the semicolon...but then it splits up the time.
Any tips or even basic thoughts on how to go about this would be appreciated since I'm new to sed/awk and regular expressions in general.
Environment: Debian Linux, Bash Shell
I have a file that contains a record similar to this on each line
Code:
/home/user/run_folder/logs/20101014//export_01_start-101410-0230.log:Thu Oct 14 02:31:01 EDT 2010:Completed export_job for 20101014
I'm starting to work on a script that parses this data, I'll take the results using a loop likely and format it neatly into an html table for easy viewing.
The file contains lines built from another script that greps through every log file in that directory and finds the lines matching 'completed' - I can re-write/edit that script if need be.
I really only care about the date/time "Thu Oct 14 02:31:01 EDT 2010" and the message "Completed export_job for 20101014" and even the "for 20101014" isn't necessary.
I've been scratching my head over this for the better part of the afternoon.
I really couldn't find a character to use awk to split the line up in any way that made sense, I initially thought I could use the semicolon...but then it splits up the time.
Any tips or even basic thoughts on how to go about this would be appreciated since I'm new to sed/awk and regular expressions in general.