From owner-freebsd-questions Thu Jul 27 16: 5:39 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dt052n3e.san.rr.com (dt052n3e.san.rr.com [204.210.33.62]) by hub.freebsd.org (Postfix) with ESMTP id 1C24037C127 for ; Thu, 27 Jul 2000 16:05:33 -0700 (PDT) (envelope-from DougB@gorean.org) Received: from gorean.org (master [10.0.0.2]) by dt052n3e.san.rr.com (8.9.3/8.9.3) with ESMTP id QAA99240; Thu, 27 Jul 2000 16:05:29 -0700 (PDT) (envelope-from DougB@gorean.org) Message-ID: <3980C039.3AB2A9EC@gorean.org> Date: Thu, 27 Jul 2000 16:05:29 -0700 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.73 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Jim Freeze Cc: questions@freebsd.org Subject: Re: declare -x References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jim Freeze wrote: > > I accidently discoverd that I can use > > declare -x ENVVAR="value" > > from a bash command line to set an environment variable. > > However, I cannot find 'declare' in the man pages (so I don't know what > the -x does) and I cannot run this in a script. Works only from the > command line. It's a bash'ism. Items like this that don't appear in the system (only in the shell) can usually be found in the man page for that shell. I don't recommend using declare at all, it's much better to use export, since it also works in sh scripts, and is portable across systems. HTH, Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message