![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with expect script | somedude | Shell Programming and Scripting | 4 | 06-04-2009 01:39 PM |
| script hanging - remsh | vivsiv | Shell Programming and Scripting | 2 | 07-09-2006 04:41 PM |
| help with 'expect' script? | maeve | Shell Programming and Scripting | 0 | 06-02-2004 07:18 PM |
| Expect Script HELP | zuinc | Shell Programming and Scripting | 2 | 04-30-2002 10:42 AM |
| hanging sql script | inquirer | UNIX for Dummies Questions & Answers | 4 | 12-26-2001 10:11 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I am new at developing EXPECT scripts. I'm trying to create a script that will automatically connect to a UNIX server via FTP and download a log file from the server within a specified server directory on the remote machine. I'm having problems with the EXPECT script "hanging" at the password prompt. Any help would be appreciated to get this issue resolved. Below is the code snippet and the actual results that are shown when executing this Expect script within a Bash file. Please take into consideration that I can't provide the exact server name in the code snippet.
Code: set tgtHostLong [lindex $argv 1] set ftpUser [lindex $argv 2] set password [lindex $argv 3] set timeout -1 spawn ftp $tgtHostLong match_max 100000 expect -exact "User ($tgtHostLong none)):"send -- "$ftpUser\r" expect -exact "Password: " send -- "$password\r" expect -exact "ftp> " Actual Result: spawn ftp xxxxxxxx.xxxx.xxx.com User (xxxxxxxx.xxxx.xxx.com none)): m25047Password: |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|