Below is the bash script. Its executing infinitely. I want to execute the script only for 10 servers, which i have stored in servers.txt file. please help
#!/bin/bash
user=$1
pass=$2
if [ "$#" -ne 2 ];then
echo "Please run the script with userid and password as arguments"
fi
cat servers.txt | while read host
do {
./sandy_try.sh $user $host $pass
} < /dev/null; done