1

Expect/Tcl script combining foreach and while commands

view story
linux-howto

http://www.linuxquestions.org – Hello, I already know how to read from a list of devices and log in to issue commands via expect, based on a list of commands for each specific device, like this: Code: set USER [lindex $argv 0] set PASS [lindex $argv 1] set NODE [lindex $argv 2] set timeout 15 set LOAD_CMD [open "./cpe_check-files/rad-commands.txt" r] set CMD_LIST [split [read $LOAD_CMD] "\n"] close $LOAD_CMD spawn ssh $USER@$NODE expect {         timeout {                 puts "\n\n##### $NODE - UNREACHABLE #####\n"; exit 3 &n (HowTos)