After searching the net looking for my answer, I post here to ask the question:
I'm trying to write a script that will retrieve files automatically config routers on my network. I want it automatically executes what I do by hand.
This is the algorithm:
Connecting telnet 192.168.1.1
Write "copy running-config tftp"
In bash, it would:
eval "copy running-config tftp"
I scored "eval" command by default, obviously it does not work. Do you know a command to automate this task? I heard about the language but I would expect whether it is possible to do in Bash script initially.
Normally it is in deposits, a simple apt-get (or aptitude) should suffice - \
Edit: On a Ubuntu 8.10:
~ $ Aptitude search expect
p empty-expect - Run Processes and Applications Under pseudo-terminal
p expect - A program automaton That can interactive applications
p expect-dev - A PLC Programs that can interactive applications (Developmen
expect-tcl8.3 p - A PLC Programs that can interactive applications
p expect-tcl8.3-dev - A PLC Programs that can interactive applications (Developmen
p expectk - A PLC Programs that can interactive applications (Tk hooks)
p-expectk tk8.3 - A PLC Programs that can interactively applications (Tk hooks)
libexpect p-perl - Expect.pm - Perl Expect interface
libexpect p-simple-perl - Wrapper around the Expect module
p libnet-scp-expect-perl - Wrapper for scp to send passwords via Expect
p libtest-expect-perl - Automated driving and testing of terminal-based programs
i A python-pexpect - Python module for Automating Interactive Applications
v python2.4-pexpect -
Thanks to jipicy for this tip on the forum.
Published by aakai1056
Latest update on May 17, 2010 at 12:16 PM by aakai1056.