delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/11/23/05:41:16

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C43E385801F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1637664074;
bh=SewT1kjFkRf9OWOqyvInqiJyxWc7igwEHNAGbeIZYd8=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=G230nVKbWMrSkX0MAUJfq+a1IpNhBOM6tiEkcO0sdXQv5CgN4CDevB2+RPz40p0Qt
gy2YuBiRKyYJemFifo8x5aJsYIaYiwAhKNWozBV21Im+bBkFRDin2tLSJjS1tFIway
UTvdHzlJCj11I0ah9SEkUaQSEOck5GWPbgOD83N4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A9993858D28
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:date:from:to:subject:in-reply-to:references
:message-id:mime-version:content-transfer-encoding;
bh=iZX+nE+sjWwYzRQsPEQgE1akIVorgGE0rqi4/Pz1Vxk=;
b=FJ8gwvV7BDl9v4r8qFgwr7Ge34whDN8yosoAnBSIMyVKSRuv7/fEJqIWR3UbMaJsU7
rVY9D+zhQYB9hHmUMLmqHESfHzzlRmkXv7fGGPcb15RB/lyQEx8532RYyLN0NexqLbYu
Bh+/IbQatACGEOcFz+l28OvWL6/eD9e/8+S4p5JuX8rVzn1XrR0b+zX0ZYWs7G63iEp2
cUOOEv8LL9JYJtugg4m83+ItsxbQjJ9ULbvAeXl1qZHKvya3sJLBK5C097YY8tXmvKmt
QD59fXrXNvPVLyn0dpFeNuaeE2Gfcxxl0unoC+7PM8Fz5RhKQCvPARmIYfNzLs9woR4l
zktA==
X-Gm-Message-State: AOAM531s7+I4tssU9pHyY0wjx/zB7xlvCJHR7Nj8F4sf3H6NAuQSh2sD
wG+Actip7DgQic2bxLkAPZ5o6c3+P6E=
X-Google-Smtp-Source: ABdhPJzl5HZqRHBDBKYOSr16C6RkNMUKsnUcRHPfjUpAFEtLK8C9xY6ccShaQQjOV3MTswIXKF1NvQ==
X-Received: by 2002:a63:bf46:: with SMTP id i6mr2967733pgo.218.1637664042144;
Tue, 23 Nov 2021 02:40:42 -0800 (PST)
Date: Tue, 23 Nov 2021 19:40:41 +0900
To: cygwin AT cygwin DOT com
Subject: Re: Program files environmental variables
In-Reply-To: <CAEhDDbD8XK+pyt=4PjJBF21D1YfYNDDOYm3-VwfYBdOERd2SEg@mail.gmail.com>
References: <693ff161-60af-7e60-7325-ce0f2b42acc0 AT mail DOT com>
<CAEhDDbD8XK+pyt=4PjJBF21D1YfYNDDOYm3-VwfYBdOERd2SEg AT mail DOT gmail DOT com>
Message-Id: <20211123194039.B573.50F79699@gmail.com>
MIME-Version: 1.0
X-Mailer: Becky! ver. 2.75.04 [ja]
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Lemures Lemniscati via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Lemures Lemniscati <lemures DOT lemniscati AT gmail DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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 AT cygwin DOT 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

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019