I want to write a script using a for loop and ssh, to log in several server. After logging in using awk command I want to get 7th column printed as output.
I tried the script below but couldn't worked out.
I created a list of IP's in /tmp/list
.
for i in `cat /tmp/list`
do
echo $i
echo "***********"
ssh $i |grep tsm |awk -F : '{print $7, "\t"}'
echo
done