-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2009-03-05 at 22:21 -0500, Brian K. White wrote:
Why don't you use expect for this as that is what it was designed for.
Good god no that's like saying why use a shell script when you could just make an array of solenoids to press the keyboard keys by reading a player piano roll. Expect was designed for cases where no other or no better way exists. Expect was designed to automate things which were not originally designed to be automated, and it should really only be used as a last resort when that is exactly the case, when you need to automate something that has no facility already for doing so. As a system, it's never very robust, merely, .. lucky. As long as the program you are interacting with always behaves exactly the same way (such as the dialup login prompt of a remote system originally), and as long as your expect script has enough complexity to handle any unexpected output (or lack of), then things will work ok. But ultimately, no matter what, no mater how good expect itself is or how well you wrote your expect script (which can be quite non-trivial and subtle!) you still have a system where 1/2 of the system was not designed to be automated.
ssh on the other hand was designed to be automated from the get go and has it's own robust, and _simpler_ means built-in.
Mmm... I have to use expect to automate ssh into my router, as there is no way to put the key file into its "filesystem". No other way round. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkmwmUAACgkQtTMYHG2NR9VsswCfWr+5VBo2LanxyHbhKQd40DQR DOcAmgMjUrkTDN8VwwtAQwCfQd1qD1ac =Vs/b -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org