Hi, from below output I need to capture the DKC0 and DKA100 respectively to PKC0 and PKA0. Idea is if I pass PKA0 it should print DKA0 and if I pass PKA0 then it shd print DKA100. If I pass PKD0 and PKC0 it shd not print anything.


SCSI Summary Configuration:
---------------------------
SPDT Port STDT SCSI-Id SCDT SCSI-Lun Device UCB Type Rev
-------------- -------------- -------------- -------- -------- ------ ----
88282440 PKD0
8828FC00 1

8826AA00 PKC0
8827EE00 0
8827F000 0 DKC0 881A52C0 LOGICA 2.58
88277C80 1

88218AC0 PKB0

880D5280 PKA0
88087A40 1
88087300 0 DKA100 880E0800 36.4G HPC3

88282440 PKD0

Test that the first byte is a digit, split on the space if true, and test that the second element starts with a "P", then print everything that starts with a "D" that follows if I follow your description (which was not very clear). You can also store all records from one checkpoint. When the next checkpoint is found, process the list of the previous records and start storing again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.