![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| non interactive vim | proactiveaditya | Shell Programming and Scripting | 1 | 09-21-2009 07:50 AM |
| How to write script that behaves both in interactive and non interactive mode | rits | Homework & Coursework Questions | 8 | 08-18-2009 12:47 AM |
| Help with Interactive / Non Interactive Shell script | rits | Homework & Coursework Questions | 1 | 08-16-2009 05:39 PM |
| Interactive ftp get/put | darrenm | Shell Programming and Scripting | 5 | 05-18-2009 09:40 AM |
| Webpage to Telnet via Perl and Expect: Telnet problem? | jondo | Shell Programming and Scripting | 1 | 07-22-2008 01:35 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Thanks indeed for that link.
but it has the following line Code:
# Assume $remote_server, $my_user_id, $my_password, and $my_command were read in earlier # in the script. # Open a telnet session to a remote server, and wait for a username prompt. spawn telnet $remote_server expect "username:" # Send the username, and then wait for a password prompt. send "$my_user_id\r" expect "password:" # Send the password, and then wait for a shell prompt. send "$my_password\r" expect "%" # Send the prebuilt command, and then wait for another shell prompt. send "$my_command\r" expect "%" # Capture the results of the command into a variable. This can be displayed, or written to disk. set results $expect_out(buffer) # Exit the telnet session, and wait for a special end-of-file character. send "exit\r" expect eof I search lot of sites through search engine but none gave exact information. Thanks, Shahnaz |
|
||||
|
The command is "interact" (very non-intuitive, right?)
See my A Y2K Problem solved with Expect for an example. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|