using expect scripts for remote admin
i've read the expect pages up and down (aka man expect). and while i've gained basic knowledge of the tool, i'm a bit stuck with an advanced topic.
to remote admin multiple debian boxes and update them using a simple script.
there are 10 boxes, so this script would be something like:
while $i [box1name box2name box3name etc...]
send "ssh -l root $i"
send "apt-get update"
send "apt-get upgrade -y"
goto nextbox ;
again, i am by no means a scripting/expect master, i would greatly appreciate some insight on this. i've searched google high and low, and yes even played with autoexpect but it didn't quite return the results desired.