I want to use expect file for connecting to telnet session automatically, the flow is:
- when we connect to some IP & port, it will show
escape character is ]
- after that we have to give Ctrl+D
I wrote one expect file that sends
\x04 for Ctrl+D. When I run that file it is fine for connecting but expecting me to give Ctrl+D from keyboard. But I want it to automatically enter Ctrl+D from the script itself. Nothing should be done manually.
Can you please explain the way?