From owner-freebsd-questions@FreeBSD.ORG Tue Jan 29 00:19:39 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 A98C5AD0 for ; Tue, 29 Jan 2013 00:19:39 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 68F11975 for ; Tue, 29 Jan 2013 00:19:39 +0000 (UTC) Received: from r56.edvax.de (port-92-195-8-191.dynamic.qsc.de [92.195.8.191]) by mx01.qsc.de (Postfix) with ESMTP id 74CC03CC66; Tue, 29 Jan 2013 01:09:51 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r0T09sG1002156; Tue, 29 Jan 2013 01:09:54 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 29 Jan 2013 01:09:54 +0100 From: Polytropon To: Fbsd8 Subject: Re: sh & export Message-Id: <20130129010954.897294b3.freebsd@edvax.de> In-Reply-To: <51070FD6.8070808@a1poweruser.com> References: <51070FD6.8070808@a1poweruser.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 00:19:39 -0000 On Mon, 28 Jan 2013 18:55:02 -0500, Fbsd8 wrote: > I'm reading a script and i see a lot of exports. > > Is there some command to display the exported environment? Yes, sh's builtin "env" does this. > The env command does not show them. Only see things made by setenv command. It seems you're mixing shells here. The C Shell uses setenv to set variables, printenv to list them. The systems's sh uses export to set variables, and env to print them. Example (with exported and non-exported variable: $ export ASDF=yxcvbnm $ env | grep ASDF ASDF=yxcvbnm $ JKL=qwertzuiop $ env | grep JKL $ echo $JKL qwertzuiop And compare for the C shell: % setenv ASDF yxcvbnm % printenv | grep ASDF ASDF=yxcvbnm % set JKL=qwertzuiop % printenv | grep JKL % echo $JKL qwertzuiop If you omit the "| grep" step, the full list will be printed. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...