[sllug-members]: set vs. env
Stuart Jansen
sjansen at buscaluz.org
Fri Aug 4 10:35:02 MDT 2006
On Fri, 2006-08-04 at 10:20 -0600, Charlton Rose wrote:
> I am struggling to understand the difference between what I see when I
> issue the command "set", and what I see when I issue the command "env".
> Can anyone point me to a good resource to understand what each "variable
> space" means, and how it influences my running programs?
set shows you all variables that are visible to the shell.
env shows you only variables that are visible to both the shell and
programs started by the shell.
http_proxy="123.123.123.123:3128"
set | grep http_proxy
env | grep http_proxy
# $http_proxy is only visible to the shell
export http_proxy
set | grep http_proxy
env | grep http_proxy
# $http_proxy is now visible to programs started by the shell
--
Stuart Jansen e-mail/jabber: sjansen at buscaluz.org
google talk: stuart.jansen at gmail.com
"However beautiful the strategy, you should occasionally look at
the results." -- Winston Churchill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://sllug.org/pipermail/sllug-members/attachments/20060804/09cd54cd/attachment.pgp
More information about the sllug-members
mailing list