dbrock has asked for the wisdom of the Perl Monks concerning the following question:
Hello...
I am working on a script to report errors from a backup tool... I have all of the errors in one comma-delimited file... Is there a slick way to parse the lines and group the data, so that I can write them to seperate files... corresponding to the NODE NAME (the first comma-delimit i.e. XXXYYZZ,)
My example file is generated from a SQL query and placed in comma-delimited form... The comma delimited file has three data sources (node,datestamp,error)...
ABHS00001,2004-01-16 01:43:24.000000,ANE4987E Error processing
ABHS00001,2004-01-16 01:46:24.000000,ANE4987E Error processing
ABHS00001,2004-01-16 01:49:24.000000,ANE4987E Error processing
AH2D21001,2004-01-15 22:57:32.000000,ANE4987E Error processing
AH2D21001,2004-01-15 22:57:33.000000,ANE4987E Error processing
AH2D21001,2004-01-15 22:57:34.000000,ANE4987E Error processing
AH2S21003,2004-01-16 02:23:05.000000,ANE4987E Error processing
AH2S21003,2004-01-16 02:24:05.000000,ANE4987E Error processing
AH2S21003,2004-01-16 02:24:05.000000,ANE4987E Error processing
ESI2A55P,2004-01-16 04:21:43.000000,ANE4037E File Skipped
ESI2A55P,2004-01-16 04:25:43.000000,ANE4037E File Skipped
ESI2A55P,2004-01-16 04:27:43.000000,ANE4037E File Skipped
Any assistance would br great
Darrick...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Assistance with Comma parse
by pg (Canon) on Jan 21, 2004 at 06:27 UTC | |
by Anonymous Monk on Jan 22, 2004 at 12:19 UTC | |
|
Re: Assistance with Comma parse
by duff (Parson) on Jan 21, 2004 at 05:51 UTC | |
|
Re: Assistance with Comma parse
by Abigail-II (Bishop) on Jan 21, 2004 at 12:31 UTC | |
|
Re: Assistance with Comma parse
by BUU (Prior) on Jan 21, 2004 at 10:13 UTC | |
by raptnor2 (Beadle) on Jan 22, 2004 at 01:26 UTC | |
|
Re: Assistance with Comma parse
by captain_haddock (Novice) on Jan 22, 2004 at 13:49 UTC | |
|
Re: Assistance with Comma parse
by Anonymous Monk on Jan 22, 2004 at 14:48 UTC |