From: "Henry S. Thompson" <ht@inf.ed.ac.uk>
To: <cygwin@cygwin.com>
Subject: Re: CygwinPaltform Identification
Date: Wed, 09 Feb 2022 09:12:12 +0000 [thread overview]
Message-ID: <f5by22kqu8j.fsf@ecclerig.inf.ed.ac.uk> (raw)
In-Reply-To: <f2da839b-5304-2c5d-9e5b-083fadfe3768@SystematicSw.ab.ca> (Brian Inglis's message of "Tue\, 8 Feb 2022 18\:46\:07 -0700")
Brian Inglis writes:
> On 2022-02-08 15:01, julie77793@gmail.com wrote:
>> Cygwin doesn't create an environment variable in bash to indicate that the
>> platform is Cygwin under Windows.
>> ...
>
> I have been switching env/OS/arch/triple dependent profile and rc files
> and sections for years with:
>
> 64 $ echo $OSTYPE $OS $HOSTTYPE $MACHTYPE
> cygwin Windows_NT x86_64 x86_64-unknown-cygwin
> ...
When I don't know or can't remember what variable has the information
I want, printenv is my first stop, e.g.
64> printenv | grep -i cygwin
Cygwin=server
PATH=...
As Brian pointed out, that doesn't find what you need, because it only
lists environment variables, but this does:
64> declare -p | grep -i cygwin
declare -ar BASH_VERSINFO=([0]="4" [1]="4" [2]="12" [3]="3" [4]="release" [5]="x86_64-unknown-cygwin")
declare -x Cygwin="server"
declare -- MACHTYPE="x86_64-unknown-cygwin"
declare -- OSTYPE="cygwin"
declare -x PATH=...
ht
--
Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail from me _always_ has a .sig like this -- mail without it is forged spam]
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
next prev parent reply other threads:[~2022-02-09 9:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 22:01 Bug Report julie77793
2022-02-08 22:22 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-02-09 1:46 ` CygwinPaltform Identification Brian Inglis
2022-02-09 4:13 ` julie77793
2022-02-09 6:07 ` Allen Hewes
2022-02-09 8:10 ` Cygwin Platform Identification Brian Inglis
2022-02-09 9:12 ` Henry S. Thompson [this message]
2022-02-09 10:01 ` Brian Inglis
2022-02-09 6:29 ` Bug Report Ernie Rael
2022-02-09 16:24 ` Bill Stewart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5by22kqu8j.fsf@ecclerig.inf.ed.ac.uk \
--to=ht@inf.ed.ac.uk \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).