On Monday 02 November 2009 14:31:07 Earnie Boyd wrote, quoting me:
> > On Friday 30 October 2009 17:54:53 George V. Reilly wrote:
> >> I'm trying to test the value of the insanely named
> >> PROGRAMFILES(X86) environment variable
> >
> > Insanely named indeed; I don't know of any *nix shell which will
> > accept parentheses as legitimate characters in variable names!
> > You could try something like:
> >
> > PROGRAMFILES_X86=`env | sed -n s,'^PROGRAMFILES(X86)=',,g`
> >
> > and test $PROGRAMFILES_X86 instead.
>
> We could standardize on a common set of these and propagate to the
> windows tasks in the spawn functions. Some windows environment
> variables are already being modified.
In some future, yet to be released, version of MSYS? I guess we
could do that, but who would define the standard set, and who will
implement it? Perhaps it could be made end-user configurable?
Ultimately, it will be Cesar's decision.
However, even if we do implement such a feature, it will not solve
George's problem, (as I understand it); rather, it will solve the
complementary problem. George's problem arises from a malformed
environment variable name, inherited *by* MSYS *from* Windows, and
incapable of interpretation in MSYS shell scripts, as a result of
the invalid characters it contains. Your proposal mangles valid
MSYS variables to alternatives, (possibly invalid in MSYS), for
passing back to native Windows; the problem at hand requires the
opposite, i.e. transformation of the invalid Windows form to a valid
MSYS form, on inheritance of the malformed variable at MSYS start
up, from the invoking native Windows session. That transformation
can be achieved, in current MSYS without any modification, by use of
sed filters such as I have suggested[*], as required by the user.
[*] corrected from my original reply:
PROGRAMFILES_X86=`env | sed -n s,'^PROGRAMFILES(X86)=',,p`
(note `p' flag, not `g', following the sed substitution command).
--
Regards,
Keith.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
MinGW-users mailing list
[hidden email]
A: Yes.
> Q: Is it really?
>> A: Because the logical conversation flow is disrupted.
>>> Q: Why does MinGW object to top posting?
(abstracted from Larry Hall signature)
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users