I have this output from a drive diag command.
Slot Number : 0
Drive's position : DiskGroup 0
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 447.130 GB [0x37e436b0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : PHYM813201FL480BGNSSDSC2KG480G7R SCV1DL58
Foreign State : None
Media Type : Solid State Device
Temperature : 20C (68.00 F)
S.M.A.R.T alert : No
Slot Number : 1
Drive's position : DiskGroup 0
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 447.130 GB [0x37e436b0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : PHYM81320058480BGNSSDSC2KG480G7R SCV1DL58
Foreign State : None
Media Type : Solid State Device
Temperature : 21C (69.80 F)
S.M.A.R.T alert : No
Slot Number : 2
Drive's position : DiskGroup 1
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 1.090 TB [0x8bba0cb0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : SEAGATE ST1200MM0099 ST31WFK0VEBK
Foreign State : None
Media Type : Hard Disk Device
Temperature : 22C (71.60 F)
S.M.A.R.T alert : No
Slot Number : 3
Drive's position : DiskGroup 1
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 1.090 TB [0x8bba0cb0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : SEAGATE ST1200MM0099 ST31WFK0T07T
Foreign State : None
Media Type : Hard Disk Device
Temperature : 22C (71.60 F)
S.M.A.R.T alert : No
Slot Number : 4
Drive's position : DiskGroup 1
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 1.090 TB [0x8bba0cb0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : SEAGATE ST1200MM0099 ST31WFK0VAJK
Foreign State : None
Media Type : Hard Disk Device
Temperature : 22C (71.60 F)
S.M.A.R.T alert : No
Slot Number : 5
Drive's position : DiskGroup 1
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 1.090 TB [0x8bba0cb0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : SEAGATE ST1200MM0099 ST31WFK0SYPC
Foreign State : None
Media Type : Hard Disk Device
Temperature : 22C (71.60 F)
S.M.A.R.T alert : No
Slot Number : 6
Drive's position : DiskGroup 1
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 1.090 TB [0x8bba0cb0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : SEAGATE ST1200MM0099 ST31WFK0MVN2
Foreign State : None
Media Type : Hard Disk Device
Temperature : 22C (71.60 F)
S.M.A.R.T alert : No
Slot Number : 7
Drive's position : DiskGroup 1
Media Error : 0
Other Error : 0
Predictive Failure : 0
Raw Size : 1.090 TB [0x8bba0cb0 Sectors]
Firmware state : Online, Spun Up
Inquiry Data : SEAGATE ST1200MM0099 ST31WFK0SZ2L
Foreign State : None
Media Type : Hard Disk Device
Temperature : 22C (71.60 F)
S.M.A.R.T alert : No
And I would like to only make changes on the 3,4,5,7,9 and 12th line after the ":" sign. Those results are the standards but I want to add some color if it says something different. For example:
Slot Number : 7
Drive's position : DiskGroup 1
Media Error : 4 (I want the whole line in red)
Other Error : 3 (I want the whole line in red)
Predictive Failure : 1 (I want the whole line in red)
Raw Size : 1.090 TB [0x8bba0cb0 Sectors]
Firmware state : Failed. (I want the whole line in red)
Inquiry Data : SEAGATE ST1200MM0099 ST31WFK0SZ2L
Foreign State : Unconfigured (I want the whole line in red)
Media Type : Hard Disk Device
Temperature : 22C (71.60 F)
S.M.A.R.T alert : Yes (I want the whole line in red)
I would like to make those changes for every drive, the drive quantity is variable, sometimes is more sometimes is less.