I saw it but have some problems running it.. I also want to make some scripts that make some string parsing and things like that… I’m not sure where is the problem and I wanna now why it works with Linux, but not with Mikrotik
I’ve lied you a little. The script that works with 2.7.18 has use_pty => 1. If I set it to zero I’ve got the same result as 2.8.18. But 2.8.18 doesn’t work even with use_pty => 1.
arghhhhhhhhhhhhhhhhh a nasty bug in Mikrotik… I saw it before a long time ago…
When you log to the console on some host happens that after the first \r sended it starts working normaly.. before that you can type a command, but you cann’t erase and use “tab” key, because 94A shows… and nothing happens after that… If you press enter, the command is not executed, but It starts working again normaly… arghhhhhhhhh
expect is a good tool (“language”) to learn, it makes life much easier for any “interactive” style connection, but of course, everyone is tempted to use other tools such as plain ssh or various programming languages.
One particular thing to be aware of is the treatment of stderr by the local/remote computer. This is rarely handled properly, because “visually”, when the session is interactive, everything appears to be “output” from the remote side.