I have a file containing lines in the following format:
/u/dir1/test/error05022006: 2322 = Total Error count...
(Note the multiple spaces between the colon and the value - I think that's where my problem lies. Also, the directory path - /u/dir1/test - will change from line to line so the lengths are always different.)
Anyway, I'm trying to grab values and produce a line like the following:
Total Errors for 20060502: 2322
(Note that the value can range from zero (0) to 5 or 6 digits.)
I'm sure awk can do it and started out by parsing on spaces. However, the multiple spaces are (I think) throwing me off and everything gets worse from there.
Any suggestions/ideas/thought/comments/blank checks greatly appreciated!
And thanks as always in advance for the assistance.
Tom
"My mind is like a steel whatchamacallit ...
/u/dir1/test/error05022006: 2322 = Total Error count...
(Note the multiple spaces between the colon and the value - I think that's where my problem lies. Also, the directory path - /u/dir1/test - will change from line to line so the lengths are always different.)
Anyway, I'm trying to grab values and produce a line like the following:
Total Errors for 20060502: 2322
(Note that the value can range from zero (0) to 5 or 6 digits.)
I'm sure awk can do it and started out by parsing on spaces. However, the multiple spaces are (I think) throwing me off and everything gets worse from there.
Any suggestions/ideas/thought/comments/blank checks greatly appreciated!
And thanks as always in advance for the assistance.
Tom
"My mind is like a steel whatchamacallit ...