Do you mean that you want to capture the output of ls -l?
Why would you need Expect for this at all? Have a look at the Expect.pm documentation and the answer to the question "I just want to read the output of a process without expect()ing anything. How can I do this?": http://search.cpan.org/~rgiersig/Expect-1.15/Expect.pod
If the output of the command is very long then I'd recommend to redirect the STDOUT of the command to a file and then later on process this file.
In reply to Re: Expect Question
by elTriberium
in thread Expect Question
by tmaly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |