In AIX Korn shell with no nawk access, I would like to run the "tapeutil -f /dev/rmt0 inventory" command, search the output for a line containing the word "Slot" and print the line AND the 3ed line after the line that contains the work "Slot'. If this can be done as a one liner it would be great.
Example of data:
Source Element Address Valid ... No
Media Inverted ................. No
Volume Tag .....................
Slot Address 4116
Slot State ..................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. No
Robot Access Allowed ........... Yes
Source Element Address Valid ... No
Media Inverted ................. No
Volume Tag .....................
Wanted output:
Slot Address 4116
Media Present .................. No
Thank You in Advance for your suggestions. I hope that I was clear and included all needed information.
Example of data:
Source Element Address Valid ... No
Media Inverted ................. No
Volume Tag .....................
Slot Address 4116
Slot State ..................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. No
Robot Access Allowed ........... Yes
Source Element Address Valid ... No
Media Inverted ................. No
Volume Tag .....................
Wanted output:
Slot Address 4116
Media Present .................. No
Thank You in Advance for your suggestions. I hope that I was clear and included all needed information.