Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jul 2010 08:36:39 -0400
From:      Jerry <freebsd.user@seibercom.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: how to setenv using Bourne .sh
Message-ID:  <20100710083639.35b154d3@scorpio>
In-Reply-To: <AANLkTiklf4jVVPXKsSKAYHHas9t4mhfBgm-BMBokTb5F@mail.gmail.com>
References:  <AANLkTiklf4jVVPXKsSKAYHHas9t4mhfBgm-BMBokTb5F@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 10 Jul 2010 11:43:13 +0000
b. f. <bf1783@googlemail.com> articulated:

> Polytropon wrote:
> On Sat, 10 Jul 2010 10:53:17 +0800, Aiza <aiza21 at comclark.com> 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.
> 
> It looks like he is actually using csh, because in the Bourne shell
> issuing that command usually yields "setenv: not found".  His problem
> is that, unlike "export",  setenv doesn't take an "=" between the
> variable and the value to be assigned to it.  See csh(1).
> 
> >> man setenv is useless.
> >
> >The manual entry of setenv can be found in "man csh". :-)
> 
> When you are directed to builtin(1), it usually means that you should
> refer to the manpage(s) of the shell that you are using for the
> information that you need.
> 
> >> The question is how do I set a environment variable using the default
> >> freebsd shell?
> >
> >You mean: FreeBSD's default scripting shell. :-)
> 
> He could mean the default interactive shell, which could be something
> other than sh(1), despite the title of his message.  As an alternative
> to "export" or "setenv", he could instead use env(1) in some
> instances.

Perhaps, just posting the output of: "env | grep -i SHELL" might prove
useful.

-- 
Jerry ✌
FreeBSD.user@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

Man will never fly.
Space travel is merely a dream.
All aspirin is alike.



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