From owner-freebsd-questions@FreeBSD.ORG Tue Jan 29 00:41:37 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CF881FE1 for ; Tue, 29 Jan 2013 00:41:37 +0000 (UTC) (envelope-from fbsd8@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id A48CAA5A for ; Tue, 29 Jan 2013 00:41:37 +0000 (UTC) Received: from [10.0.10.3] ([173.88.197.103]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 28 Jan 2013 16:41:38 -0800 Message-ID: <51071ABF.1020603@a1poweruser.com> Date: Mon, 28 Jan 2013 19:41:35 -0500 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: FreeBSD questions Subject: Re: sh & export References: <51070FD6.8070808@a1poweruser.com> <444ni0dewi.fsf@lowell-desk.lan> In-Reply-To: <444ni0dewi.fsf@lowell-desk.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jan 2013 00:41:38.0878 (UTC) FILETIME=[662F85E0:01CDFDB9] X-Sender: fbsd8@a1poweruser.com X-Authenticated-Sender: fbsd8@a1poweruser.com X-EchoSenderHash: [fbsd8]-[a1poweruser*com] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 00:41:37 -0000 Lowell Gilbert wrote: > Fbsd8 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.