From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77048 invoked by alias); 1 Oct 2017 17:01:11 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 77038 invoked by uid 89); 1 Oct 2017 17:01:11 -0000 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 Received: from mail-oi0-f44.google.com (HELO mail-oi0-f44.google.com) (209.85.218.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 01 Oct 2017 17:01:06 +0000 Received: by mail-oi0-f44.google.com with SMTP id w197so1343606oif.6 for ; Sun, 01 Oct 2017 10:01:06 -0700 (PDT) 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) Received: from rbO ([2605:6000:9fc0:56:3c14:e5c4:5a0e:92]) by smtp.gmail.com with ESMTPSA id b56sm4506376ote.77.2017.10.01.10.01.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Oct 2017 10:01:03 -0700 (PDT) Message-ID: <59d11f4f.3b189d0a.39b5f.144a@mx.google.com> Date: Sun, 01 Oct 2017 17:01:00 -0000 From: Steven Penny X-Google-Original-From: Steven Penny To: cygwin@cygwin.com Subject: Re: bash command substitution References: <8f69ce8f-1092-abdb-e19d-85018ef0c260@informatik.hu> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) X-SW-Source: 2017-10/txt/msg00005.txt.bz2 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