Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2013 19:41:35 -0500
From:      Fbsd8 <fbsd8@a1poweruser.com>
To:        FreeBSD questions <questions@freebsd.org>
Subject:   Re: sh & export
Message-ID:  <51071ABF.1020603@a1poweruser.com>
In-Reply-To: <444ni0dewi.fsf@lowell-desk.lan>
References:  <51070FD6.8070808@a1poweruser.com> <444ni0dewi.fsf@lowell-desk.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
Lowell Gilbert wrote:
> Fbsd8 <fbsd8@a1poweruser.com> writes:
> 
>> I'm reading a script and i see a lot of exports.
>>
>> Is there some command to display the exported environment?
>>
>> The env command does not show them. Only see things made by setenv command.
> 
> You're not clear on which shell the script is using. 
> The subject line implies /bin/sh, but that doesn't
> have a setenv command. 
> 
> I don't think there's a direct way to show exported 
> variables in /bin/sh, but starting an inferior shell 
> and looking at the environment there should do it.
>


This is what I am looking at in a sh script

echo export jail_${jailname}_hostname=\"${jailname}\"
puts it into the env
and this brings it back out
eval jailname=\"\$jail_${jailname}_hostname\"

Question is how can I display from the console command
line what has been exported?

env issued on the console command line does not show
any thing named jail.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51071ABF.1020603>