Subject: Re: env command does not work correctly.
From: [email-masked] (Fergus Henderson)

4 Apr 1997 06:39:18 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text
Original-To: [email-masked] (John D. Robertson)
Original-Cc: [email-masked] (gnu-win32)
In-Reply-To: <Pine.LNX.3.91.970403090237.294B-100000@localhost> from "John D. Robertson" at Apr 3, 97 09:08:37 am
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: [email-masked]

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 <[email-masked]>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger [email-masked]         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".