From: Paul G. <pga...@at...> - 2002-06-07 22:54:09
|
On 7 Jun 2002 at 7:06, Earnie Boyd wrote: > "Paul G." wrote: > > > > Isn't "Set"supposed to be used to define environment variables under bash? > > > > Bash has a rather intuitive feature for internal commands, > help set > would give you the answer. umm...already tried that. Set is apparently _not_ used for defining environment variables under bash. "Set" at bash prompt reports status of bash shell. Do not see anything else that is being referenced here. Command Prompt is different story, "Set" will always define an environment variable at NT4/Win9x/etc. Command Prompt(s). Bash is not "generic MS Console command prompt". Based on assumption that by typing just the command/word "Set" at the bash prompt reports all of the currently defined environment variables. (Starting point) Environment Variables: When entering the following (at bash command prompt): set $ENV /usr/local/dir and then typing only "Set" at bash prompt, ENV is neither listed nor defined. Similarly the following are true: Set $Env = /usr/local/dir Set env=/usr/local/dir Set env = /usr/local/dir "Set" apparently defines _shell_ status, not environment variables. Typing the following at bash prompt: $env /usr/local/dir does not define anything, typically results in shell error: sh: /usr/local/dir: is a directory (like, "duh" -- yes, in fact it _is_ a defined directory). env /usr/local/dir yields shell error: env: d:\msys\1.0\local\dir: No such file or directory (*meeep*, WRONG -- dir is defined) myenv /usr/local/dir yields shell error: sh: myenv: command not found Of course command not found (duh), there is no such command as "myenv", but I wasn't trying to invoke a command, was trying to define an environment variable from bash prompt. (See Environment Variables: starting point above.) Newbie Question: how do you define environment variables from bash prompt? Paul G. |
From: Paul G. <pga...@at...> - 2002-06-09 23:45:29
|
Thank you everyone for your replies. On 8 Jun 2002 at 9:03, Prof Abimbola Olowofoyeku wrote: > Paul G wrote: > [...] > >Newbie Question: how do you define environment variables from bash > >prompt? > > I would have thought that someone would have answered this by now. If they did, for some reason I missed it. (Might be due to the fact that it was 4am local time, but, hey, who can say...;-) ). >The > answer is: use "export" - e.g., > export africa="A nice and hot place" That was what I was trying to "figure out". Thanks. Now I know what to look for in automake, autoconf, config.in, etc. Again, thanks everyone for your replies. I am very grateful and very appreciative. Paul G. |
From: Luke D. <cod...@ho...> - 2002-06-08 04:31:15
|
----- Original Message ----- From: "Paul G." <pga...@at...> To: <min...@li...> Sent: Saturday, June 08, 2002 6:52 AM Subject: Re: [Mingw-msys] (newbie) question > > > On 7 Jun 2002 at 7:06, Earnie Boyd wrote: > > > "Paul G." wrote: > > > > > > Isn't "Set"supposed to be used to define environment variables under bash? > > > > > > > Bash has a rather intuitive feature for internal commands, > > help set > > would give you the answer. > > umm...already tried that. Set is apparently _not_ used for defining environment variables under bash. Exactly. This is the answer to your original question :) (cut cut cut) > Newbie Question: how do you define environment variables from bash prompt? foo=bar export foo Or: export foo=bar I think I said to you once before, see: http://mefriss1.swan.ac.uk/~jfonseca/gnu-win32/documentation/chm/bashref.chm Open the help file and go to "environment" in the index. > > Paul G. > Luke |
From: Randy W. S. <RandyS@ThePierianSpring.org> - 2002-06-08 07:00:27
|
> -----Original Message----- > From: min...@li... > [mailto:min...@li...]On Behalf Of Paul G. > Sent: Friday, June 07, 2002 6:53 PM > To: min...@li... > Subject: Re: [Mingw-msys] (newbie) question > > On 7 Jun 2002 at 7:06, Earnie Boyd wrote: > > > "Paul G." wrote: > > > > > > Isn't "Set"supposed to be used to define environment > variables under bash? > > > > > > > Bash has a rather intuitive feature for internal commands, > > help set > > would give you the answer. > > umm...already tried that. Set is apparently _not_ used for > defining environment variables under bash. "Set" > at bash prompt reports status of bash shell. Do not see anything > else that is being referenced here. Command > Prompt is different story, "Set" will always define an > environment variable at NT4/Win9x/etc. Command Prompt(s). > Bash is not "generic MS Console command prompt". > > Based on assumption that by typing just the command/word > "Set" at the bash prompt reports all of the > currently defined environment variables. > > (Starting point) > > Environment Variables: > > When entering the following (at bash command prompt): > > set $ENV /usr/local/dir > > and then typing only "Set" at bash prompt, ENV is > neither listed nor defined. > > Similarly the following are true: > > Set $Env = /usr/local/dir > > Set env=/usr/local/dir > > Set env = /usr/local/dir > > "Set" apparently defines _shell_ status, not environment variables. > > Typing the following at bash prompt: > > $env /usr/local/dir > > does not define anything, typically results > in shell error: > > sh: /usr/local/dir: is a directory > > (like, "duh" -- yes, in fact it > _is_ a defined directory). > > env /usr/local/dir > > yields shell error: > > env: d:\msys\1.0\local\dir: No > such file or directory > > (*meeep*, WRONG -- dir is defined) > > myenv /usr/local/dir > > yields shell error: > > sh: myenv: command not found > > Of course command not found > (duh), there is no such command as > "myenv", but I wasn't trying to > invoke a command, was > trying to define an environment variable from bash > prompt. (See > Environment Variables: > starting point above.) > > Newbie Question: how do you define environment variables > from bash prompt? > > Paul G. > ``set'' defines a local shell variable. You must use export to put the variable in the environment. HTH, Randy. |