Program files environmental variables
Lemures Lemniscati
lemures.lemniscati@gmail.com
Tue Nov 23 10:40:41 GMT 2021
On Tue, 23 Nov 2021 10:52:18 +0100, Csaba Raduly via Cygwin
> On Tue, 23 Nov 2021 at 10:02, john doe via Cygwin <cygwin@cygwin.com> wrote:
> >
> > Cygwins,
> >
> > Is there a way to get the value of PROGRAMFILES(x86) and PROGRAMW6432 in
> > Bash:
> >
>
> $ env | grep PROGRAMFILES
> COMMONPROGRAMFILES=C:\Program Files\Common Files
> PROGRAMFILES=C:\Program Files
>
> These are the environment variables visible in my Cygwin environment.
>
> echo "$PROGRAMFILES(x86)" is the equivalent of echo
> "${PROGRAMFILES}(x86)" i.e. the value of $PROGRAMFILES, followed by
> the fixed string "(x86)"
>
> I tried
>
> $ echo "${PROGRAMFILES(x86)}"
> $ echo "${PROGRAMFILES\(x86\)}"
>
> and bash outright refused them ("bad substitution"). So it may not be
> possible to have an environment variable with ()s in its name.
/usr/bin/printenv 'ProgramFiles(x86)'
Lem
More information about the Cygwin
mailing list