Expect - Parallel Expect spawn

Posted on Mon May 21 23:29:39 2007 by jubafre
Parallel Expect spawn
Hello!! I'm newbie using Expect and Tcl. I'm tring to connect to some hosts using telnet and execute some commands in all of thesse hosts. I want to run this script in parallel way, passing a list of hosts and the "commands" are executed in parallel not sequentially. I'm try to use some examples found in google, but is not a parallel scrip. Somebody can help me to parallel spawn? foreach system $hosts { set pid [fork] if {$pid == 0} { puts $system puts $pid exec ./sstk-auto.sh $system disconnect } } whats wrong? somebody can help me? thanks! JF
Write a response