Hello all , need help with this ...
Input File
DEV % POOL
0CB4 FBA 2211300 81792 4 IE RAID-5(3+1) R5_EFD100_1
- - 1805376 82 IF RAID-1 M2_FC300_1
- - 132360 6 IS RAID-6(6+2) R6_SA2000_1
0CB5 FBA 1883700 852732 45 IF RAID-1 M2_FC300_1
- - 338112 18 IS RAID-6(6+2) R6_SA2000_1
0CB6 FBA 1638000 12096 1 IE RAID-5(3+1) R5_EFD100_1
- - 396528 24 IF RAID-1 M2_FC300_1
- - 303024 18 IS RAID-6(6+2) R6_SA2000_1
0CB7 FBA 1605240 16380 1 IE RAID-5(3+1) R5_EFD100_1
- - 50664 3 IF RAID-1 M2_FC300_1
- - 100752 6 IS RAID-6(6+2) R6_SA2000_1
Output needed
DEV,R5_EFD100_1%:M2_FC300_1%:R6_SA2000_1
0CB4,4:82:6
0CB5,0:45:18
0CB6,1:24:18
0CB7,1:3:6
Need to format the input using the DEV ,% and POOL Column
If any pool is missing for a DEV , put 0 instead , for example in 2nd row
pool R5_EFD100_1 is not present for 0CB5 , so R5_EFD100_1% would be 0 for that column
Thanks !