X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=RLP83p05XdHyJkmn C+VM71h7lw1M9PMVBIR2byrz27vaZKU95dgG4MmnY0Cxx6xrsnlzd64s5+eG7GIJ qMLPXJrJFAvD2zXbx3bIzqiumKUTn28HKRVmYxbfIN0UyS7iBRKkpzjb1KgfDLkG 2eI7NAAUzzlpH+3UguVta2Z/1i0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=2qBI2aOR50+m45NljdUWVi hK1n0=; b=OAnhHnpi1PzaO/3s1w30W7bGnHkDKUXmj9jmKo9gearDtzRRBf+J8k 8gCIIecXvNn8Vjqw4bHgIONsxQK8i4D49+dZ+TCM9OSBgWFajRNBijtwCnozYNPT QYO/x8Dl3ou19LaXSYyTsSsMzW5FmE0l0nFrrj2HIBIVas1JT43uk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*F:D*yandex.ru, H*M:yandex, Directly, H*x:Bat! X-HELO: forward103o.mail.yandex.net Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru Date: Tue, 27 Feb 2018 17:47:41 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <574336209.20180227174741@yandex.ru> To: Numien , cygwin AT cygwin DOT com Subject: Re: Setting a bash variable from backtick operator fails In-Reply-To: <29d3fea9-89e2-0eab-8bba-486b25fa875b@deathwyrm.com> References: <29d3fea9-89e2-0eab-8bba-486b25fa875b AT deathwyrm DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Numien! > While working on diagnosing an issue with autotools, I found Cygwin's > bash seems to not be able to set a variable from backtick substitution, > at least on my system (Cygwin x86_64, updated today, on Win10) > On a Linux system it works as expected: > $ test=`echo "x86_64-pc-cygwin" | sed 's/-[^-]*$//'`; echo $test > x86_64-pc > On a Cygwin system it doesn't: > $ test=`echo "x86_64-pc-cygwin" | sed 's/-[^-]*$//'`; echo $test > (no output) I'm unable to reproduce it here. > This also happens in scripts (where I originally encountered the > problem), not just on the command line. > Directly outputting it (echo `echo "x86_64-pc-cygwin" | sed > 's/-[^-]*$//'`) works fine, it seems to be specifically related to > setting a variable. > Any suggestions? Any BLODA? -- With best regards, Andrey Repin Tuesday, February 27, 2018 17:47:03 Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple