If I type:
Code: Select all
gnome-terminal -e 'ssh user@192.168.1.1 sudo apt-get -y update'
If I put the following in a script ($line is the ip address in the nodes file):
Code: Select all
while read line; do
gnome-terminal -e 'ssh user@'$line' sudo apt-get -y upgrade'
sleep .5
done </mybin/nodes
How can I make this loop run so each gnome will stay open and complete the task?
Many thanks.