delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/10/01/13:17:05

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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=BLaSiMb
1IHPZ004heoOl6S90E2DlwHJQnfbPIaMAfHraFaKzR8trDzLfGVmwOcJf2yjafhz
0G2RKMlMoMlY5AIIovQU1AFkGMpUe7a/qxQorMfLmYomHggHuOKkO7LJ5/4bwHpg
1CH8IS6diZpwzvqvBz9wQUWLR4WsBMdPTZD8=
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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=wnvtkvDNrH0FW
PiaXRZ3OV4b2Ls=; b=wxEjCT+2E4NWYZ7w0P42Oc3a0ZBJTC5q0MqNGkwXUlD70
Duz4AnGVUNpn4Gw5f5j/OMZYajkHRtLFDUc2yehpkR/R/oI5avPlagcCwoaHgUXD
WoCIzpv7igEDBf7So+dqy102VkQbBYLG93JbT/faetjLzwM225/qhtTiZv5nd8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=3.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*F:D*tv, Mihaly, mihaly, H*c:alternative
X-HELO: mail-it0-f42.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=HMe+enozPTIc05xEs8NNrH4itvVfi7m5j1RHtQFF+A4=; b=EcGOq2iwiaPysX49OQvMdk1bIesZwi9s7tRLsSV5MwjYKVlhigCIvhxXgNVpMXEGzk 5iHlNRap2hUPHQKGw7kvmND/9ZM3nkfRT7BHvjiaRWfJBO+0m5rQ98HRruCS6/RslNLQ D/YPbsFLeuMXXaRExAwcK2GqqVWj1K7J+gy4Evncg0Q5Bm2StWOtixTNduTsknZtOsVm 1kIG1EeAUl5UdDtlTu9497AQv/3X3EO80A5BsTAVe557G50xZcaJeIBJWIkTCAqDiKIe 438UNAsmjq1BIyl9je7+KzHTJ4cWAA/afDQfOb2BDMMA2bIZW6TXyszPHAB2OeC3ag0i VNgw==
X-Gm-Message-State: AMCzsaXopLxcisoJMXhSTHKREqk/03KTeBZt2Suzsllc3wY5vwWKzZvi Uy7Va0Wo/7KNqKS2AraRruMc9od/KrdmLElSKTw=
X-Google-Smtp-Source: AOwi7QCX6EddY99IfXdtecD8go+W4bd89VGFwOnaJ8ts8kWN6kRevdd4y5qDoUPbJHELJGlR1QgfFtGe97OuAcntT+Y=
X-Received: by 10.36.213.69 with SMTP id a66mr10423091itg.89.1506878206300; Sun, 01 Oct 2017 10:16:46 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <59d11f4f.3b189d0a.39b5f.144a@mx.google.com>
References: <8f69ce8f-1092-abdb-e19d-85018ef0c260 AT informatik DOT hu> <59d11f4f DOT 3b189d0a DOT 39b5f DOT 144a AT mx DOT google DOT com>
From: Wouter van Doorn <wouter AT vandoorn DOT tv>
Date: Sun, 1 Oct 2017 18:16:25 +0100
Message-ID: <CANZ2p_eMARdbhRxS9j0D2GFMb71n-B+k2Z9dTOQ8bcNKguwDnw@mail.gmail.com>
Subject: Re: bash command substitution
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Try the following:

echo $(echo hello | cat)

If that remains empty, (it should of course result in 'hello') you're
suffering from the same problem I have. And no, I did not get it resolved.
In which case I'd be elated if you could get anyone interested in finding a
solution!

If this happens to you, too, then the problem is that the pipe in a
subshell simply does not work. For the vast majority, it DOES work.

On 1 October 2017 at 18:01, Steven Penny <svnpenn AT gmail DOT com> wrote:

> On Sun, 1 Oct 2017 08:40:51, Vukovics Mihaly wrote:
>
>> VHEIGHT=$(ffprobe -v error -show_entries stream=width,height -of
>> default=noprint_wrappers=1 ${OLDFILE} | grep "height" | cut -f2 -d'=')
>>
>> For debugging purpose the same command is executed without putting the
>> result into a variable, and works! Does anyone know why is it not working
>> in cygwin?
>>
>
> I am not having this trouble:
>
>    $ VHEIGHT=$(ffprobe -v 0 -of compact=p=0:nk=1 -select_streams 0 \
>    -show_entries stream=height 'The Master (2012).mp4')
>
>    $ echo "$VHEIGHT"
>    1040
>
> but as Marco said, you might need to sanitize for carriage returns:
>
>    $ echo "$VHEIGHT" | od -tcx1
>    0000000   1   0   4   0  \r  \n
>             31  30  34  30  0d  0a
>
>
>
> --
> 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
>
>

--
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

- Raw text -


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