From owner-freebsd-questions@FreeBSD.ORG Tue Feb 26 14:04:33 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 0DD841065671 for ; Tue, 26 Feb 2008 14:04:33 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from m.it.okstate.edu (m.it.okstate.edu [139.78.2.129]) by mx1.freebsd.org (Postfix) with ESMTP id DACBE13C455 for ; Tue, 26 Feb 2008 14:04:32 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (localhost.it.okstate.edu [127.0.0.1]) by m.it.okstate.edu (8.13.8/8.13.8) with ESMTP id m1QE4WZx011881 for ; Tue, 26 Feb 2008 08:04:32 -0600 (CST) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <200802261404.m1QE4WZx011881@m.it.okstate.edu> To: freebsd-questions@freebsd.org Date: Tue, 26 Feb 2008 08:04:32 -0600 From: Martin McCormick Subject: Re: 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: Tue, 26 Feb 2008 14:04:33 -0000 Roger Olofsson writes: >If you're not too worried about speed my old trick to circumvent this >was to simply write the variable to a temporary file then read in that >file for the send_user thing later on...Providing the send_user is a >script, mind you. An excellent idea. I just wanted to be sure I wasn't missing something else. In this case speed isn't a problem since what I am doing is allowing all our group to get a current copy of the syslog file on our DHCP server when they need to look at something and not all of them have or need accounts there so the script uses an account that does work to get the file and then it will hand the caller the file with all the right permissions. To complicate things, more than one caller might use the script simultaneously so I need to use a temporary file name and keep track of it so that nobody clobbers anybody else's file. All that part is done except for that last part and that is what you helped with. Many thanks. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Network Operations Group