set port $env(PIXIL_PORT) spawn -open [open $port w+] exec stty raw ispeed 115200 ospeed 115200 < $port > $port send_user "Waiting for ogin:\n" send "\030\030\030\030\030\r\n" expect { ogin: { send_user "Found ogin\r" sleep 1 send "root\r" } \# { sleep 1 send_user "logged in\r" } } send "\r\n" expect { \# { send_user "logged in 2\n" send "cd /usr/local/pixil/share/data/\r" send "rz -qby\r" # exec $env(PIXIL_BIN)/sz.pixil add.dbf not.dbf sched.dbf td.dbf < $port > $port exec sz add.dbf not.dbf sched.dbf td.dbf < $port > $port send_user "got files ok\n" } timeout { send_user "Timeout\n"; } }