Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jul 1998 22:12:18 -0500
From:      Jon Hamilton <hamilton@pobox.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        FreeBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: Unsetting exported environment variables? 
Message-ID:  <199807190310.UAA24713@hub.freebsd.org>
In-Reply-To: Your message of "Sun, 19 Jul 1998 12:24:46 %2B0930." <19980719122446.M957@freebie.lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

In message <19980719122446.M957@freebie.lemis.com>, Greg Lehey wrote:
} On Saturday, 18 July 1998 at 21:42:00 -0500, Jon Hamilton wrote:
} >
} > In message <19980719103309.J957@freebie.lemis.com>, Greg Lehey wrote:
} >
} >> That was the confusion.  I didn't know that there was an unset command
} >> in the Bourne shells as well.
} >
} > I'm rather surprised that you didn't manage to turn this up on your own,
} > though; since it's a shell question, I would think it would be obvious to
} > look in the shell's man page.  From the sh(1) man page on a -stable system:
} >
} >      unset name ...
} >              The specified variables and functions are unset and unexported
} .
} >              If a given name corresponds to both a variable and a function,
} >              both the variable and the function are unset.
} >
} > I know you already found the answer; I'm just marveling that you asked
} > the list in the first place.
} 
} Man pages are good for finding something if you know what you're
} looking for.  I never thought there would be an "unset" command, so I
} would have needed to read the entire man "page" (68 pages in the case
} of bash), which is rather inefficient.  I *did* scan it, but I thought
} it would be quicker to ask.  It was.

You're just being lazy; I am certain your problem solving skills are really
much better than that.  Your original question mentioned that you wanted to
unexport a variable; the string ``unexport'' occurs only once in the sh(1)
manpage, and not coincidentally it's in the section you were seeking.

Granted, ``unexport'' doesn't appear in the bash(1) manpage, but that's 
really the wrong place to look anyway.

I was somewhat amused that not too long after asking your question, you went 
and RTFM'd wizkid11@xnet.com when he asked a question about a serial patch.
I guess irony can be pretty ironic sometimes.

-- 
   Jon Hamilton  
   hamilton@pobox.com


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?199807190310.UAA24713>