thx for the help guys, but still not working. I´m running against a wall with this one, however I try to modify
I think the problem is in the ssh request happening. How could I switch if an error occurs out of the while loop? Do I need to insert another if ... then querry or is another while loop better to get the effect if an error in the connection occurs or during transition of commands to jump out of the first while loop?
A colleague of mine told me to try to simplify the ssh requests and to merge them together. But Im not sure, if this will solve my problems! What do you think about this?
Another error I´m receiving is, if an machine is up and ping'able, but the time to live delivers an error, is it possible to set a filter, to get this machines seperated without awk and sed?
Here is what I mean:
PING 172.16.15.10 (172.16.15.10) 56(84) bytes of data.
From 10.128.16.155: icmp_seq=1 Time to live exceeded
My script runs till this message, and then breaks without an error message. The rest of the ips won´t be considered further. How could I involve this into my script? Any proposals?