Hi,
I'm running an expect script and am having problems getting this pattern to match. I can figure out why expect is not matching this pattern. Can anyone help?
Thanks. LEE
Here's the part of my expect script:
expect {
-re "226 Transfer complete.*ftp> $" {
send_user "FTP session completed.\n"
}
timeout {
send_user "Timeout receiving file $ofile. +180 sec.\n"
set ERR 41 ; set nodel 1 ; err_receiving
}
eof {
send_user "Unexpected output!\n"
set ERR 42 ; set nodel 1 ; err_receiving
}
}
Here's the debug output from expect:
expect: does "close\r\n221 Goodbye!\r\nftp> " (spawn_id 4) match regular expression "221 Goodbye*ftp> $"? no
I'm running an expect script and am having problems getting this pattern to match. I can figure out why expect is not matching this pattern. Can anyone help?
Thanks. LEE
Here's the part of my expect script:
expect {
-re "226 Transfer complete.*ftp> $" {
send_user "FTP session completed.\n"
}
timeout {
send_user "Timeout receiving file $ofile. +180 sec.\n"
set ERR 41 ; set nodel 1 ; err_receiving
}
eof {
send_user "Unexpected output!\n"
set ERR 42 ; set nodel 1 ; err_receiving
}
}
Here's the debug output from expect:
expect: does "close\r\n221 Goodbye!\r\nftp> " (spawn_id 4) match regular expression "221 Goodbye*ftp> $"? no