meetramana
Programmer
Hi,
Datafile contains:
SERVER1
SERVER2
SERVER3
.....
......
Script:
while read server;
do
echo "checking for server $server"
ssh $server "ps -ef | grep processname"
done < Datafile
Isn't above script supposed to loop through all the servers in the Datafile.
right now it just runs for the first line and then stops.
any ideas what could be wrong.
it echos all the servers fine if I comment out the ssh line
Datafile contains:
SERVER1
SERVER2
SERVER3
.....
......
Script:
while read server;
do
echo "checking for server $server"
ssh $server "ps -ef | grep processname"
done < Datafile
Isn't above script supposed to loop through all the servers in the Datafile.
right now it just runs for the first line and then stops.
any ideas what could be wrong.
it echos all the servers fine if I comment out the ssh line