This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: env command does not work correctly.


John D. Robertson, you wrote:
> 
> I downloaded the cygnus SDK yesterday, and I am very pleased that these 
> tools have been ported to Win32.  I soon attempted to port my tools that 
> run under Linux and Irix to gnu-win32, and I ran into a problem.
> 
> The "env" command does not set environmental variables as it is supposed 
> to.  For example:
> 
>    env ONE=one TWO=two echo_1_2
> 
> where echo_1_2 is a sh script:
> 
>    #!/bin/sh
>    echo $ONE $TWO
> 
> 
> will print nothing.

I don't know why env doesn't work, but exporting variables from bash
does seem to work, so as a workaround I would try something like this:

	#!/bin/sh
	# shell script replacement for gnu-win32 broken `env' command
	eval "$@"

Well, that probably stuffs up quoting, but you get the idea...

> I have also noticed that it is not possible to 
> export lower case environmental variable at all.  I have seen this 
> elsewhere in the list.

That one, and a few others, are listed on
<http://www.cs.mu.oz.au/~fjh/gnu-win32/bugs-list.html>.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]