Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2008 10:20:47 -0600
From:      Martin McCormick <martin@dc.cis.okstate.edu>
To:        freebsd-questions@freebsd.org
Subject:   Setting Variables in expect Scripts From Shell Output
Message-ID:  <200802251620.m1PGKl4w069144@dc.cis.okstate.edu>

next in thread | raw e-mail | index | archive | help
	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
LOGFILENAME.

Thanks.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802251620.m1PGKl4w069144>