问题
Trying to achieve a goal of running putty's plink -telnet via Tcl Expect.
When i do a regular:
plink -telnet 127.1.1.2
i get an output of the process and am able to properly conduct what i have planned.
But when i try the same from Tcl Expect:
% package require Expect
5.43.2
% exp_internal 1
% spawn plink -telnet 127.1.1.2 -s
16196
% expect -nocase login
expect: does "" (spawn_id exp4) match glob pattern "login"? no
expect: timed out
there is simply no response from the piped process.
Tcl: ActiveTcl 8.6(x86) Expect: 5.43.2 Putty: latest x86 Win10 x64
Or, if possible, could you please suggest another telnet client which works correct with tcl's expect(currently using Win7 native, but want to try something different, and yes, i know that "telnet is just a telnet", but have crash issues with the native one).
来源:https://stackoverflow.com/questions/46174136/tcl-expect-with-putty