Date: Tue, 26 Feb 2008 08:04:32 -0600 From: Martin McCormick <martin@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org Subject: Re: Setting Variables in expect Scripts From Shell Output Message-ID: <200802261404.m1QE4WZx011881@m.it.okstate.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802261404.m1QE4WZx011881>