I need to login and collect output of below commands from multiple GNU/Linux servers through SSH. I have done password-less SSH authentication. I wanted to do this with bash script.
df -lh | awk '{if ($5 >= 20) { print $6 " " $2 " " $3 " " $5 }}'
top -b -n1 | grep "Cpu(s)" | awk '{print 100 - $5}'
I tried the command below, but instead of a quoted "command", if giving single command like df it's working .. but giving like long commands:
df -lh | awk '{if ($5 >= 20) { print $6 " " $2 " " $3 " " $5 }}'
top -b -n1 | grep "Cpu(s)" | awk '{print 100 - $5}'
it's not working..