How do i capture output to a variable with expect?

From: Ryan B. (ryan_at_biltz.com)
Date: 07/29/04


Date: 29 Jul 2004 11:23:06 -0700

I have a an expect script that logs in to an ftp site and issues the
ls command.
I want expect to dump the file listing to a local file. How do I do
this? It must be something simple but i'm new to expect and tcl.
Please help.

My script issues the following command to get the list of files on the
ftp server:

send -h "ls/r"

TIA



Relevant Pages