Setting Variables in expect Scripts From Shell Output

Martin McCormick martin at
Mon Feb 25 16:31:00 UTC 2008

	While running an expect script, is it possible to set an
expect script variable to the string kept in a shell variable?

	I can generate the shell variable just fine but when I
try to export it to the expect script for later use with something like:

set LOGFILENAME [exec echo \$TMPFILE]

something happens without error, but a later attempt to see the
contents of it such as

send_user "$LOGFILENAME\n"

proves that it never got set. It just echoes the literal string


More information about the freebsd-questions mailing list