delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/09/05/11:30:04

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFE523851C3A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1599319763;
bh=yNM8zkGQT4WS06Y1ngp7HC0AFFZI/3ckbvvvf2deWI4=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=Pz4ZK62m7ckBdg91gJ8qkTknGtSnKpUAkMaRVvlIRKFBNMlChU+AZ+Q13X7E8Npe8
ZONU9EMyxReTxJpNa1bdb2t+55TpjLxYb3XD2uLhO/gvuoBTbm3q+0oYOgZpPkv76O
UOQ4R+qoKNzcbbnQS6Q+AqYjCj1nkIhHqnZ24Bd4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6DBBB3857813
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=+MvhNXTqOEcgUsTPoRR2cIHdBBU//0zXKzni2DCH4gg=;
b=K9PCTxk/rED5+i3f9FnMg81D9VirVtKktKbWuUvzDCVuMO7h/OOs48OxA/4s8aVLmv
Hj3fsKId+Huq7/1ZqjYtw/CQSsskB4DL6uZ+0hMtNaDGvsPpYVkFCQ8y6rk3I171Cjd1
Jq0usl9TsQ7yyOu7YDY/5owzsNZ+X1EXQOgch21dwiLux5aNBcFEyHJMu68lX02ce+CX
A1LsI34U+3zN6Ri2oiy3DP3fvTkJ9oET48PxLKDRKPLghxo2GAyHGOZKcuauqnlLUOAs
g9ynrm9FkaTUkR2PfYhiKEivOGebvmUBKsm+y32HR66PC08JWPstLjRgYVR/hlY7VLcA
+pXA==
X-Gm-Message-State: AOAM53189zDz+xpRxWgWaUSWl0TxKliN8bfSucxeSXS5N9YgmGGhyvUC
Rvqu6eXZoVjB9Rlhkfv2wOkYssviWYO38GCdVd0=
X-Google-Smtp-Source: ABdhPJy3SFIQQYSEYfysQzj2944TX33FXMUSO5amPsUpwSd7y4ATtE/IaazQqcdBpMhTFuv+X/Gcrpc1+uNZnqp5s2M=
X-Received: by 2002:a17:906:300b:: with SMTP id
11mr12795249ejz.270.1599319759469;
Sat, 05 Sep 2020 08:29:19 -0700 (PDT)
MIME-Version: 1.0
References: <50fad2a4-22c3-8de8-3a0a-394c0b95048b AT gmail DOT com>
In-Reply-To: <50fad2a4-22c3-8de8-3a0a-394c0b95048b@gmail.com>
Date: Sat, 5 Sep 2020 10:29:08 -0500
Message-ID: <CAOXR0FfRVspg7VCVH3zfvvY6E33JCcyuoU=b6nuvL1bYvFr2qA@mail.gmail.com>
Subject: Re: Is this a bug in bash?
To: Bob McGowan <ramjr0915 AT gmail DOT com>
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
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-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: Greg Borbonus via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Greg Borbonus <gregborbonus AT gmail DOT com>
Cc: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Out of curiosity, why are there 2 different sets of quotes?

Thanks,
Greg Borbonus

On Fri, Sep 4, 2020, 10:23 PM Bob McGowan via Cygwin <cygwin AT cygwin DOT com>
wrote:

> I am trying to set things up so the Bash profile detects if bash is
> running from the Windows "XWin Server" startup link or not. The startup
> link has the following as the command:
>
> C:\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; exec
> /usr/bin/startxwin"
>
> So I thought I'd try adding the env command to set an environment variable:
>
> C:\cygwin64\bin\run.exe --quote /usr/bin/env startxwin=yes
> /usr/bin/bash.exe -l -c "cd; exec /usr/bin/startxwin"
>
> This works (if there's a better way, I'd be happy to learn of it) but in
> the process of testing I had a problem when echo'ing the variable.
>
> For purposes of describing the bug, I simplified the command as follows:
>
>      env startup=yes bash -l -c 'echo "cmd:  $startup"'
>
> I also added an "echo profile: $startup" to the .bash_profile file.
>
> When I run the above in a Cygwin shell, the output is:
>
> $ env startup=yes bash -l -c "echo cmd: $startup"
> profile: yes
> $
>
> When I run it in a Linux shell, the output is:
>
> $ env startup=yes bash -l -c 'echo "cmd:  $startup"'
> profile: yes
> cmd:  yes
> $
>
> As you can see, the Cygwin side fails to generate any output from the -c
> echo command but on the Linux system there is output.
>
> Normally I'd call this a bug but since this is running under Windows it
> may be some weirdness of the implementation required to create the Linux
> like environment.
>
> The Bash version in Cygwin is  4.4.12(3)-release and for my Debian Linux
> system, it is 5.0.3(1)-release.  So it could also be that it existed in
> Linux 4.x series and has been fixed in the 5.x series.
>
> Bob
>
> --
> 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
>
--
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