(imported comment written by donduke91)
I’m trying to create a property to retrieve HBA details for servers using fcinfo.exe /details > fcinfo.txt. The fcinfo.txt will have similar lines depending on how many ports the server has; eg, "adapter: " will show up twice for servers with 2 ports but with different text after the “:”
adapter: com.emulex-LP9002-0
node_wwn: 20:00:00:00:c9:41:3b:57
fabric: 10:00:00:60:69:e2:04:92
port_wwn: 10:00:00:00:c9:41:3b:57
osdevice: \.\Scsi3:
venid: x10DF
prodid: xF900
nports: 1
manfac: Emulex Corporation
sernum: P646C0ATEQO01I
model: LP9002
descrp: Emulex LightPulse LP9002 2 Gigabit PCI Fibre Channel Adapter
symblc: Emulex LP9002 FV3.92A3 DV5-1.11X1 NYCITASP2674
hwver: 2002606D
drvver: 5-1.11X1
optver: 3.22A0
fwver: 3.92A3
drvnam: elxstor
adapter: com.emulex-LP9002-1
node_wwn: 20:00:00:00:c9:41:3b:58
fabric: 00:00:00:00:00:00:00:00
port_wwn: 10:00:00:00:c9:41:3b:58
osdevice: \.\Scsi4:
venid: x10DF
prodid: xF900
nports: 1
manfac: Emulex Corporation
sernum: P646C0ATEQO01I
model: LP9002
descrp: Emulex LightPulse LP9002 2 Gigabit PCI Fibre Channel Adapter
symblc: Emulex LP9002 FV3.92A2 DV5-1.11X1 NYCITASP2674
hwver: 2002606D
drvver: 5-1.11X1
optver: 3.22A0
fwver: 3.92A2
drvnam: elxstor
How can I retrieve the txt after "adapter: " for each port. I tried using :
q: if exists file ((pathname of parent folder of regapp “besclient.exe”) & “\fcinfo.txt”) then following texts of firsts "adapter: " of lines whose (it contains "adapter: ") of file ((pathname of parent folder of regapp “besclient.exe”) & “\fcinfo.txt”) else “n/a”
A: com.emulex-LP9002-0
A: com.emulex-LP9002-1
How can I retrieve the output seperately for each "adapter: "?
Thanks.
Don D.