perl_newbie99 has asked for the wisdom of the Perl Monks concerning the following question:
Dear Perl experts,
I have a data file which contains media per volume pool as shown below "########" line. If a name eg "CatalogBackup Pool" has 9 fields output, then it means this pool has some medias in it. I need to find the count of such lists.
The output need to be something like:
CatalogBackup pool 8 DataStore pool 0 MonthEndPool pool 0 NetBackup pool 0 None pool 0 ScratchPool pool 3
Is there any way in perl to do this?
###########################################Here is the source data. :
###################################################################### +############################## # cat REPORT1 CatalogBackup pool 000572 HCART TLD 0 111 - - - AVAILA +BLE 002315 HCART TLD 0 355 - - - AVAILA +BLE 002316 HCART TLD 0 311 - - - AVAILA +BLE 002383 HCART TLD 0 560 - - - AVAILA +BLE 002386 HCART TLD 0 440 - - - AVAILA +BLE 002387 HCART TLD 0 537 - - - AVAILA +BLE 002390 HCART TLD 0 595 - - - AVAILA +BLE 002392 HCART TLD 0 680 - - - AVAILA +BLE DataStore pool MonthEndPool pool NetBackup pool None pool ScratchPool pool 003125 HCART TLD 0 490 - - - AVAILA +BLE 003126 HCART TLD 0 488 - - - AVAILA +BLE 003150 HCART TLD 0 480 - - - AVAILA +BLE ###################################################################### +##############################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to generate a report based on keyword?
by SuicideJunkie (Vicar) on May 17, 2010 at 19:06 UTC | |
|
Re: How to generate a report based on keyword?
by NetWallah (Canon) on May 17, 2010 at 19:46 UTC | |
by perl_newbie99 (Initiate) on May 17, 2010 at 21:12 UTC |