From owner-freebsd-questions Sat Jul 18 04:49:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA15601 for freebsd-questions-outgoing; Sat, 18 Jul 1998 04:49:51 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ns.cityip.co.za (ns.cityip.co.za [196.25.223.140]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id EAA15593 for ; Sat, 18 Jul 1998 04:49:45 -0700 (PDT) (envelope-from wjv@cityip.co.za) Received: from wjv by ns.cityip.co.za with local (Exim 1.82 #2) id 0yxVU9-0007I7-00; Sat, 18 Jul 1998 13:49:05 +0200 Message-ID: <19980718134905.A27927@cityip.co.za> Date: Sat, 18 Jul 1998 13:49:05 +0200 From: Johann Visagie To: Greg Lehey , FreeBSD Questions Subject: Re: Unsetting exported environment variables? Mail-Followup-To: Greg Lehey , FreeBSD Questions References: <19980718155422.D376@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <19980718155422.D376@freebie.lemis.com>; from Greg Lehey on Sat, Jul 18, 1998 at 03:54:22PM +0930 X-PGP: ftp://ftp.cityip.co.za/users/wjv/pubkey.asc X-URL: http://www.cityip.co.za/~wjv/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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