Scripts extraction
Résolu
prince_titi
-
jipicy Messages postés 40842 Date d'inscription Statut Modérateur Dernière intervention -
jipicy Messages postés 40842 Date d'inscription Statut Modérateur Dernière intervention -
bonjour
j'aimerais realiser un scripts ksh qui m'extrait juste les port WWN
fichier hba.txt
HBA Type : FibreChannel
HBA Name : Emulex-LP10000-1
Vendor : Emulex Corporation
Model : LP10000
Serial Number : VM64606905
Firmware Version : 1.91A5 (T2D1.91A5)
Driver Version : 7.3.2; HBAAPI(I) v2.0.f, 12-01-03
Node WWN : 20000000c95e8de6
Number of Ports : 1
Port WWN : 10000000c95e8de6
Port name : /proc/scsi/lpfc/0
Port type : NPort
Port FCID : 7218707
Port speed : 2gbit
Supported speed : 2gbit
Port state : Online
HBA Type : FibreChannel
HBA Name : Emulex-LP10000-2
Vendor : Emulex Corporation
Model : LP10000
Serial Number : VM64815051
Firmware Version : 1.91A5 (T2D1.91A5)
Driver Version : 7.3.2; HBAAPI(I) v2.0.f, 12-01-03
Node WWN : 20000000c95e5932
Number of Ports : 1
Port WWN : 10000000c95e5932
Port name : /proc/scsi/lpfc/1
Port type : PTP
Port FCID : 0
Port speed : Unknown
Supported speed : 2gbit
Port state : LinkDown
j'aimerais realiser un scripts ksh qui m'extrait juste les port WWN
fichier hba.txt
HBA Type : FibreChannel
HBA Name : Emulex-LP10000-1
Vendor : Emulex Corporation
Model : LP10000
Serial Number : VM64606905
Firmware Version : 1.91A5 (T2D1.91A5)
Driver Version : 7.3.2; HBAAPI(I) v2.0.f, 12-01-03
Node WWN : 20000000c95e8de6
Number of Ports : 1
Port WWN : 10000000c95e8de6
Port name : /proc/scsi/lpfc/0
Port type : NPort
Port FCID : 7218707
Port speed : 2gbit
Supported speed : 2gbit
Port state : Online
HBA Type : FibreChannel
HBA Name : Emulex-LP10000-2
Vendor : Emulex Corporation
Model : LP10000
Serial Number : VM64815051
Firmware Version : 1.91A5 (T2D1.91A5)
Driver Version : 7.3.2; HBAAPI(I) v2.0.f, 12-01-03
Node WWN : 20000000c95e5932
Number of Ports : 1
Port WWN : 10000000c95e5932
Port name : /proc/scsi/lpfc/1
Port type : PTP
Port FCID : 0
Port speed : Unknown
Supported speed : 2gbit
Port state : LinkDown
Configuration: Windows XP Internet Explorer 7.0
3 réponses
-
Salut,
grep "Port WWN" hba.txt | cut -d" " -f4
;-))
-
-
De rien ;-))
Et pour répondre à ta question : non, mais la toile regorge de tutoriels et les forums sont là pour ça ;-))
https://abs.traduc.org/abs-5.0-fr/
https://marcg.developpez.com/ksh/
http://bp.noos.org/computer/ksh.html
http://www.shellunix.com/ksh.html