I have this expect process:
Code:
spawn -noecho telnet my.host.com
expect {
connected
}
Now I get this string "connected" which is produced by the telnet server in $expect_out(buffer) which is fine.
Unfortunately, the same output is copied to the console where I started my expect script from. So the command that I send is surpressed with the
-noecho flag, but whatever comes back is echoed.
I don't like that, the only solution is to redirect all output to /dev/null like:
Code:
expect -f myscript > /dev/null
But that is not what I want either, because then I don't see my own messages.
Any idea how to surpress
all output produced by the spawned process?
jlinkels