0
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

Desired output:

Name,Nodes                bold and calibri
CR3HP8401,2M263601BJ      calibri
Id,CagePos,Type,State     bold and calibri  
175,9:15:0,FC,failed      calibri
  • take a look at unix.stackexchange.com/a/444212/270935 – msp9011 Mar 21 at 5:01
  • What attempts have you made to convert your text to html? – glenn jackman Mar 21 at 12:43
  • I tried pasting my csv output in an internet website where it converts to html code. i tried to cat that html and sent an, my email shows only the html code not actual table – user3016638 Mar 21 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.