I've got some expect/tcl scripts.
Now i want to add a function that allows to open a telnet connection and redirect the output to a logfile.
On the shell/terminal i tried something like:
'telnet 192.168.123.123 12121 > /home/user/logging/log-telnet.log'
and the telnet is redirected into the file. But the process could only be stopped by kill PID.
So now i want a working code that creats a redirection to a file using expect.
So that i can use it there. But the process should stop at least when the expect script ends.
Is there anyone how knows expect ?