[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: env -u is not work
From: |
Eric Blake |
Subject: |
Re: env -u is not work |
Date: |
Sat, 06 Jun 2009 13:02:45 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to utking on 6/6/2009 12:48 PM:
> Hi everyone!
>
> After setting up my environment variable like this
> $env GENA=1
> i have this one is environment list, but when i want to remove it with
> $env -u GENA or $env --unset GENA
> it still there.
>
> This actions takes is same terminal window (gnome-terminal).
>
> Is this a bug? or my hands? :)
Probably a misunderstanding on your part. 'env -u' unsets environment
variables for the single child process passed as an argument to env, and
since you didn't pass a child process name, the effect is immediately
lost. But if you want to unset an environment variable in the parent
process (your shell) and all subsequent children spawned by that shell,
then don't use env. Instead, use the shell builtin 'unset' (if you are
using a POSIX-like shell) or 'unsetenv' (if you are using a csh variant).
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoqvVUACgkQ84KuGfSFAYBLYgCeMhM6dl8x3N9zCBcEUZbv+mDG
DO4An1BWMD2wVRPuxSddo0zyqt/JID/e
=sQm8
-----END PGP SIGNATURE-----