log_user 1 set timeout 5 puts "PRE" if {[catch {spawn /bin/cat} e]} { puts "SPAWN-ERR: $e" } else { puts "SPAWNED pid=[exp_pid] sid=$spawn_id slave=$spawn_out(slave,name)" } send "ZZ9\r" expect { "ZZ9" { puts "MATCH" } timeout { puts "TIMO" } eof { puts "EOFF" } } puts "POST"