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:message-id:date:from:to:subject:references :content-type; q=dns; s=default; b=vU1yD8DVq2CsLpRnVtY2pqJUeDST+ /MROen3RAJHhB5V8FqepA93RUPK8jcGblhsP1fXis9IZP6xu9OIjVNalnDaeIMv2 FLMZXEo9JMd/83VGGt6RIhKYIv+HQ7VCmFKsLqLVO3d+TT+cuY/YwHqn2SpMkAqE pFBaYTKY7iGOn4= 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:message-id:date:from:to:subject:references :content-type; s=default; bh=m7YQgx0yhqHJlpfmV6vIuW1rvJs=; b=qq+ VGCqybMEiBCFmKfMeFO4YqzuJE6PIfhLCiGfAMy0rpUF/p2qDpi+SHnYTP2gNxdC xo5Fq8T4Xkhbqu/w8SRmjUBZxvvBIsmFEv3e3psTKtLQeYtaiAqnYBnJUM+oI7fI zynHYAdPpxHe9b3XYiIE5BSJTG8+75Qhw5yEsXNo= 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=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Mihaly, mihaly, 1040, H*UA:github.com X-HELO: mail-oi0-f44.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:subject:references :user-agent; bh=UL1yb5Ag8CtIlrZ4y4V/SlP5eS4cBKEaY8k2KNUP2cU=; b=G3J6TVY+9aZdp5esP4aLfPauNKJE/bC4g1wcORxP5f6T/pA+fqcgGpm+eZunBmfXwX X9boMZsdlwC5ogEQgPsOTd6L0UgpEhCy6rua5ayDK0YNnaGXivdlAJ1UrnAdWoIoWt4V s+qYQSNrF+HkJWo0YNmu5JoTOMmi/MXAg09ijWTMIaDU1k6It3USIGwID0vn7E6QIKrM sRzvOQ9XKpzxhbLcKSJgfPvAQAluvHnDavgw6bwfdssKcB2RfBrGqSJdUyrDYzo0N+kT bejVBbORjUl0PSJvsktwR4/DuUTI2hO/f7ewqf9vNrYzbq6/xrJ956ccvEVpGWfAqfvn uw2A== X-Gm-Message-State: AMCzsaVMsfMAhDcgQXB+BuhWZ+o8V85YDATSKatggo7vRi92/aJ4WEJQ h7x4SNHyl8tREyMvJwkXxqLNGg== X-Google-Smtp-Source: AOwi7QA/jWjzCzvY1z8uNMliEacJ2m9JTHTObUZPNX8qBk0WAQXVR2WxmBAPR+FJQDEldEyEPY/Tzg== X-Received: by 10.202.79.203 with SMTP id d194mr5899308oib.443.1506877264407; Sun, 01 Oct 2017 10:01:04 -0700 (PDT) Message-ID: <59d11f4f.3b189d0a.39b5f.144a@mx.google.com> Date: Sun, 01 Oct 2017 10:01:03 -0700 (PDT) From: Steven Penny X-Google-Original-From: Steven Penny To: cygwin AT cygwin DOT com Subject: Re: bash command substitution References: <8f69ce8f-1092-abdb-e19d-85018ef0c260 AT informatik DOT hu> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) 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