[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: checking an environment variable
From: |
Steffen Dettmer |
Subject: |
Re: checking an environment variable |
Date: |
Tue, 16 Sep 2008 10:38:50 +0200 |
On Tue, Sep 16, 2008 at 10:11 AM, Lorenzo Bettini <address@hidden> wrote:
> Keith Marshall wrote:
>>
>> Did you export it?
> If I do, on a shell:
> echo $BASH_COMPLETION_DIR
> thus I assume it is exported by the bash_completion script, isn't it?
No, the shell substitutes before invoking echo (if it is not even
a shell-builtin)
address@hidden:~ # unexported="123"
address@hidden:~ # echo $unexported
123
address@hidden:~ # env|grep unexported
(echo worked, but it is not set)
address@hidden:~ # export exported="45"
address@hidden:~ # env|grep exported
exported=45
(after export, it is set)
oki,
Steffen