Date: Thu, 28 Jun 2001 23:56:19 -0400 (EDT) From: "Ian P. Thomas" <ipthomas_77@yahoo.com> To: jim@freeze.org (Jim Freeze) Cc: freebsd-questions@freebsd.org Subject: Re: How to have a script set an environment variable Message-ID: <200106290356.XAA04190@scraemondaemon.my.domain> In-Reply-To: <Pine.BSF.4.32.0106280919330.9354-100000@www.stelesys.com> from "Jim Freeze" at Jun 28, 2001 09:24:11 AM
next in thread | previous in thread | raw e-mail | index | archive | help
What about #!/usr/local/tcsh set terminal = `tty` if ($terminal == /dev/your_terminal) then setenv TEST "test" end unset terminal and in .logout unsetenv TEST I have read people's opinions on writing cshell scripts, but I havn't run into any problems with them. Or maybe this doesn't help at all. Ian In the last episode, Jim Freeze stated... > > Hi: > > I don't know if this can be done, but I am would like > to write a script that would set an environment variable > for a particular terminal window. > > I am running tcsh. If I write a script such as: > #! /bin/sh > set TEST "test" > export TEST > > TEST is set for the script, but not for the parent > terminal. Is there a switch I can send to /bin/sh > to use the parent's environment? > > Thanks > > > ========================================================= > Jim Freeze > jim@freeze.org > --------------------------------------------------------- > No comment at this time. > http://www.freeze.org > ========================================================= > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106290356.XAA04190>