Home
The Toolkit for Online Communities
17370 Community Members, 0 members online, 2257 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : sending the output of "send" command in "Expect" to a file instead of stdout

Forum OpenACS Q&A: sending the output of "send" command in "Expect" to a file instead of stdout

Icon of envelope Request notifications

i want to send the output of "send" command  in "Expect" to a file instead of the standard output.
the code which i am using is "
..................
.....................
expect "125*" {[exec echo "125 Data connection already open;transfer starting" >> /usr/tmp/ftp_log}
.........
........

the error displayed is"

invalid command name ""
      while executing
"[exec echo "125 Data connection already open;transferring data" >> /usr/tmp/ftp_log]"
      invoked from within
expect "125*" {[exec echo "125 Data connection already open;transfer starting" >> /usr/tmp/ftp_log}.........

Even though we can use exec command in the above manner in tcl,i wonder why the above command is not running on expect!!

any help from your side is highly appreciated!

thanks
abhishek