Forum OpenACS Q&A: how to store the FTP messages using shell script


My question is how can we store the messages which are displayed during ftp using shell scripts in a log file!

i have done this using EXPECT...and the code is
set site x.y.z.w
exp_log_file "/usr/tmp/log_file"
spawn ftp $site

expect "Name*:"
send "anonymous\r"
expect "Password:"
send "";
expect "login ok ftp>\r"

The above code is working perfectly correct but i could find no function like "exp_log_file" for the shell script!also how can i simulate expect functionalities in shell scripts!

thanks in advance

Posted by Mark Aufflick on
I would use perl.

But then I use perl for a lot of things!