From owner-freebsd-questions@FreeBSD.ORG Mon Feb 25 16:31:00 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7E9316A401 for ; Mon, 25 Feb 2008 16:31:00 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (dc.cis.okstate.edu [139.78.103.93]) by mx1.freebsd.org (Postfix) with ESMTP id 7D2E613C467 for ; Mon, 25 Feb 2008 16:31:00 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (localhost.cis.okstate.edu [127.0.0.1]) by dc.cis.okstate.edu (8.13.8/8.13.8) with ESMTP id m1PGKl4w069144 for ; Mon, 25 Feb 2008 10:20:47 -0600 (CST) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <200802251620.m1PGKl4w069144@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org Date: Mon, 25 Feb 2008 10:20:47 -0600 From: Martin McCormick Subject: Setting Variables in expect Scripts From Shell Output X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2008 16:31:00 -0000 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.