ronix has asked for the wisdom of the Perl Monks concerning the following question:
Perl Priests,
Sorry, if this has been covered I could not figure out the right search terms for finding it.
I'm looking for the best method of pulling 2 specific strings from the aix command generated data below (lscfg -vl hdisk*). If it was all space delimited I'd have less questions about ways to do this, but since it is a mixture of spaces, periods, and blank lines I'm at a loss.
So I would be looking for just the physical volume name and the serial #:hdisk0 P1/Z1-Aa 16 Bit LVD SCSI Disk Drive (18200 MB) Manufacturer................IBM Machine Type and Model......ST318305LC FRU Number..................09P4437 Serial Number...............0009E05B Part Number.................09P4436 hdisk1 P1/Z1-Ab 16 Bit LVD SCSI Disk Drive (18200 MB) Manufacturer................IBM Machine Type and Model......ST318305LC FRU Number..................09P4437 Serial Number...............0004A0D2 Part Number.................09P4436
Thanks for any direction you can give and for taking the time to look.hdisk0 0009E05B hdisk1 0004A0D2
Back to
Seekers of Perl Wisdom