Loop Script?

view full story

http://www.unix.com – Hello World I need to create a script to verify ports are open from a new jump off node to access over 200 different servers. I did a little research and put together this code: !/bin/sh exec 4<nodes.dat while read sys <& 4 do # PING TEST echo "$sys" ping $sys 1 # Example of executing a remote command on the node in this script #ssh $sys "uname -n" done In the past I’ve used something like this as well: 123456789@cmp-lights: /home/123456789/proxy/conf$ nc -z -w 10 thomas 22 Connection to thomas 22 port [tcp/ssh] succeeded! 123456789@cmp-lights: /home/1234567 (HowTos)