Looping gnome?

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
Munty Scruntfundle
Posts: 54
Joined: 2018-11-27 16:53

Looping gnome?

#1 Post by Munty Scruntfundle »

Hi folks.

If I type:

Code: Select all

gnome-terminal -e 'ssh user@192.168.1.1 sudo apt-get -y update'
a terminal opens, the command runs and I see output.

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
a terminal opens, starts to run, then closes after the sleep.

How can I make this loop run so each gnome will stay open and complete the task?

Many thanks.

Munty Scruntfundle
Posts: 54
Joined: 2018-11-27 16:53

Re: Looping gnome?

#2 Post by Munty Scruntfundle »

My fault. I'm an idiot.

I was testing with a list of nodes that are already up to date. I'm so tired!

Post Reply