for i in $(cat HPE_FRAMES_IP); do ssh Reports@$i showsys | awk '{print $2","$5}' ; ssh Reports@$i showpd -degraded -failed | awk '{print $1","$2","$3","$5}' ; done | grep -v "MiB" | grep -v "total" | egrep -B3 "failed|degraded" | sed 's/---Name/\n---Name/g'| sed 's/-//g'
Name,Nodes
CR3HP8401,2M263601BJ
Id,CagePos,Type,State
175,9:15:0,FC,failed
Name,Nodes
FM1HP20841,CZ3741X5K8
Id,CagePos,Type,State
18,4:2:0,SSD,degraded
希望の出力:
Name,Nodes bold and calibri
CR3HP8401,2M263601BJ calibri
Id,CagePos,Type,State bold and calibri
175,9:15:0,FC,failed calibri