how to setenv using Bourne .sh
Polytropon
freebsd at edvax.de
Sat Jul 10 16:53:49 UTC 2010
On Sat, 10 Jul 2010 11:43:13 +0000, "b. f." <bf1783 at googlemail.com> wrote:
> 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).
Yes, you're right of course, I didn't notice that. The correct
syntax for the setenv command in the C shell is
setenv VAR "value"
> 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.
That's why I suggested looking at csh's manpage. :-(
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list