i'm currently working on a small script where i need to udate a file on multple servers, i have a long ip list of my servers and currently im using ncftpput to add the files to the servers one at a time.
i can't figure out how to start ncftpput with the next ipadress in my list so that i can have multiple updates running at the same time.
my list is just ip adresses: 192.168.0.1 192.168.0.2 192.168.0.3 ...... until 192.168.0.150
what i need is the first ncftpput to access the first ip the second number two ip and so on for the amount of threads i need / system can handle
lets say 10 at a time and when the first thread finishes it just takes the next ip NOT taken by any of the other threads.
i hope i made myself clear on my problem and that someone can help me figure this out.
so far i'm doing it this way: (runnig one at a time)
while read ip; do
ncftpput -c -A -u "$USER" -p "$PASSWD" "$ip" "/usr/local/program/program.conf" < "~/addthisinfo" 2>/dev/null
if [ $? -eq 0 ]
then
echo -e "Here goes my succes test" >>/tmp/text_added
else
echo ""
fi
done <"$pathtoiplist""/iplist"
in advance thanks.
-------edit-------------
i have full access to the server so i'm not restricted in and way conserning software to use.
Michael