how to open a shell from perl program? How to write in the shell?
am 29.08.2006 14:19:10 von _mario latHallo,
I'd like to open a shell from a program written in perl.
I write a little program that connect to a router and do some commands.
I'd like to ope a shell and directly write in the shell:
"
telnet myCiscoRouter
password_of_cisco
show interface I_NEED
"
The question are two:
1)How to open it
I try to use:
exec ( "xterm -fn 8x13 -geom 120x35+100+200 -title $router_name -e
\"/usr/bin/telnet $router_name\" &");
it open the shell but stop the programs.
2)ho to write more lines in the shell
I try:
exec ( "xterm -fn 8x13 -geom 120x35+100+200 -title $router_name -e
\"/usr/bin/telnet $router_name\npassword_of_cisco\nsho interface....\n\" &");
but don't wors well.
Thank you in advance for the time you spend for help me
Mario.