Date: Sat, 18 Jul 1998 13:49:05 +0200 From: Johann Visagie <wjv@cityip.co.za> To: Greg Lehey <grog@lemis.com>, FreeBSD Questions <questions@FreeBSD.ORG> Subject: Re: Unsetting exported environment variables? Message-ID: <19980718134905.A27927@cityip.co.za> In-Reply-To: <19980718155422.D376@freebie.lemis.com>; from Greg Lehey on Sat, Jul 18, 1998 at 03:54:22PM %2B0930 References: <19980718155422.D376@freebie.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 18 Jul 1998 at 15:54 SAT, Greg Lehey wrote: > > If you try to run SuperProbe with the variable DISPLAY set, it will > refuse to run. That's OK with the C shell, you just enter: > > % unsetenv DISPLAY > % /usr/X11R6/bin/SuperProbe > > Unfortunately, to my knowledge there's no similar function in the > Bourne shell. You can set the variable to the null string: In GNU bash, the shell builtin "export" has a flag "-n", which allows you to remove the export property from a particular variable. This does not, to the best of my knowledge, apply to the standard Bourne shell. Hmmm, I've just had a look at the man page for sh(1), and found the following: unset name ... The specified variables and functions are unset and unexported. I've just tested it, and it seems to behave similarly to the C shell's unsetenv. -- V Johann Visagie | Email: wjv@CityIP.co.za | Tel: +27 21 419-7878 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?19980718134905.A27927>