From owner-freebsd-questions@FreeBSD.ORG Sat Jul 10 11:41:43 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430E31065672 for ; Sat, 10 Jul 2010 11:41:43 +0000 (UTC) (envelope-from aiza21@comclark.com) Received: from avmxsmtp3.comclark.com (avmxsmtp3.comclark.com [202.69.191.117]) by mx1.freebsd.org (Postfix) with ESMTP id D21E88FC1A for ; Sat, 10 Jul 2010 11:41:42 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmATALP4N0zKRa3YOWdsb2JhbAAHh2iYZwEBAQE0Ab1GhScEg3mHDQ X-IronPort-AV: E=Sophos;i="4.55,179,1278259200"; d="scan'208";a="9830289" Received: from unknown (HELO [10.0.10.3]) ([202.69.173.216]) by avmxsmtp2.comclark.com with ESMTP; 10 Jul 2010 19:41:40 +0800 Message-ID: <4C385C74.3050401@comclark.com> Date: Sat, 10 Jul 2010 19:41:40 +0800 From: Aiza User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Polytropon References: <4C37E09D.7000806@comclark.com> <20100710050337.418d26c3.freebsd@edvax.de> In-Reply-To: <20100710050337.418d26c3.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "questions@freebsd.org" Subject: Re: how to setenv using Bourne .sh X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2010 11:41:43 -0000 Polytropon wrote: > On Sat, 10 Jul 2010 10:53:17 +0800, Aiza wrote: >> Trying the set the pkg_add environment variable PKGDIR using this >> >> >> setenv PKGDIR="/usr/packages" and get this error message >> setenv: Syntax Error. > > Of course. The sh shell doesn't have setenv. > > > >> man setenv is useless. > > The manual entry of setenv can be found in "man csh". :-) > > > >> The question is how do I set a environment variable using the default >> freebsd shell? > > You mean: FreeBSD's default scripting shell. :-) > > $ PKGDIR="/usr/packages" > $ export PKGDIR > > or > > $ export PKGDIR="/usr/packages" > > Refer to "man sh" for details. The setenv command is a built-in for > the C Shell. > > > When I put export on the console command line I get this message export: Command not found. But I was able to get setenv and unsetenv to work this way setenv PKGDIR "/usr/packages/" unsetenv PKGDIR and just setenv shows me everything already set.