Re: Expect scripting
- From: Uwe Klein <uwe_klein_habertwedt@xxxxxxxxxxx>
- Date: Sun, 20 May 2007 11:35:06 +0200
I couldn't think of how to capture text from a telnet session so again> My thoughts were that exec is using the shell and
I reverted to what I am familiar with which is script and used exec
although I though spawn would do the same thing. What is the
spawn is basically doing the same. Is that misguided?
Shoot your guidedog! ;-)
NEITHER uses the shell.
exec has a shell-similar piping and redirection syntax.
but it ends there.
spawn hangs your process onto the tty side of a pty.
i.e. your spawned program will feel right at home just
like in the interactive environment it was written for.