Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parsing ioscan output

Status
Not open for further replies.

mariocq

MIS
Apr 20, 2001
61
US
hi all,

I am making an script to balance load manually between hadrware paths to disks. I need to parse ioscan output. but before this
I need to join the line with the device files with the line with the hardware path.

this is the input

disk 2592 0/0/6/1/0.11.65.0.0.1.1 sdisk CLAIMED DEVICE EMC

SYMMETRIX
/dev/dsk/c74t1d1 /dev/rdsk/c74t1d1


and what I want to obtain is


disk 2592 0/0/6/1/0.11.65.0.0.1.1 sdisk CLAIMED DEVICE EMC SYMMETRIX /dev/dsk/c74t1d1 /dev/rdsk/c74t1d1

In case you can´t see it properly the above data should be in only one line.


regards,
mario.
 
Something like this perhaps:

[tt]ioscan -funC disk | awk '$1=="disk" { getline dev ; print $0,dev }'[/tt]

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top