Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2007 12:20:11 -0800
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: export command not found?
Message-ID:  <45CE28FB.2080404@u.washington.edu>
In-Reply-To: <45CDBC2C.6050005@infracaninophile.co.uk>
References:  <45CDB934.6080802@passagen.se> <45CDBC2C.6050005@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Seaman wrote:
> Roger Olofsson wrote:
>> Dear Mailing List,
>>
>> 6.2-STABLE FreeBSD just made world.
>>
>> # export VARIABLE value
>> export: Command not found.
>>
>>
>> What happened to export?
>>
>> Grateful for any answer!
> 
> /bin/sh is not bash on FreeBSD.  IF you're using /bin/sh, then you
> need to assign and export values as separate operations:
> 
>    FOO=bar
>    export FOO
> 
> Also, root's shell is not /bin/sh or anything of that ilk by default.
> It is /bin/csh aka /bin/tcsh, and for that the syntax is:
> 
>    setenv FOO bar
> 
> 	Cheers,
> 
> 	Matthew

Sorry, but that's incorrect. One line exports do work in either bash or sh:

[gcooper@sprsd ~]$ export FOO=bar; echo $FOO
bar
[gcooper@sprsd ~]$ sh
$ export FOO=bar; echo $FOO
bar

He's probably using (t)csh.

-Garrett




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