From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 807A21F5AE for ; Mon, 27 Jul 2020 19:04:57 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1k08Qd-00072c-Lb; Mon, 27 Jul 2020 19:04:51 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k08Qc-00072T-Jy for sox-users@lists.sourceforge.net; Mon, 27 Jul 2020 19:04:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=fCn67zxtciReEcc7QOGL0mZuCGByO/EtYB6mxfDjq7o=; b=mhXOGru3Vfniicb6rZLOz0yQ6 Rukfc62234Hs7vj1imKnJqHHersSaDUjSjjFL5ddjQpW/cYpZkmweFVRyyrx82o8jhwzOdMg6cME0 c3csL57CzMTxyacdWzLbgSh2VuqNhqKradi5/39ra4EfxE8Wv01sWqsSmC42yE57446G0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fCn67zxtciReEcc7QOGL0mZuCGByO/EtYB6mxfDjq7o=; b=cSefmvxF9N/+b/0w5P3OwbB6mv bcZm28ZoOMl6Pu8jFrhXqLw2/pSRhyQxOPzy1GdNgS9AN4Qn839TChQnY71V7HeHuuionKLoVsILS ybTPlNtFqTycwqV1fIm7bnPJlBfUoNNS8BGITJVQ5M6nG8LfHqPfP0+6AbTtI/gChQPo=; Received: from mail-wr1-f50.google.com ([209.85.221.50]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1k08QZ-001Mfh-5D for sox-users@lists.sourceforge.net; Mon, 27 Jul 2020 19:04:50 +0000 Received: by mail-wr1-f50.google.com with SMTP id 88so15940214wrh.3 for ; Mon, 27 Jul 2020 12:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=fCn67zxtciReEcc7QOGL0mZuCGByO/EtYB6mxfDjq7o=; b=m0e0q9PAjWbQEz/TG49GIXbDflcRIYoWeUnLeAWDj1e+jv/Gmj+sUpY9GAgELjH2gk OrXV7Wo6Gb5/NBvuKFB5+6RpDPw/bsDSiqX5FJDKVTDxMVEPZ2DrS0/+PJWiJhZUUcet eItKHP6VRoVc36Wlssla0d2mPvncj5ISonKq++1zNpOUzhtvU9rLEzps3k2zsNYNWcTb twB0J2hUOlApzPEt5iHHgJ/7zX1+IZxiSNoIzUSE88z1e5sBw/78NGUHuYotf3teND24 dSwGMr/szdHV4CSw0gwUJHQIXlFkJlJ2IBm5nszpqdVxmM5UBEMsX3f4w2lK8UUI2PKH wY1A== 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; bh=fCn67zxtciReEcc7QOGL0mZuCGByO/EtYB6mxfDjq7o=; b=bgQ9g1WgX8qF88Hj5A1AN0zaFoXh+Hgk6NekSOjSG3dBhKvsNkapGKeUl5km02GYNM EYF1JoSTTFSgInvmFe65rYn5AQNRd/qq0/yenrFFujWJ2BGu0UvTHl72J5vHJYFOlItn 3pKkv5ejCRw46thuYVH172jG71gJuTNXsGsMn0+2giMG69gA9I5ghF53aok+4GFHZsru AEjvEpC0ieHWOlZU6+/J97U+jIHoFnGJoZtGfUA3hZDy/KlRakfPSD/5vUzAKUdU9eu4 qjIJA9//sXt2vJYeKGeySedujZ1X/kDITUjiLV7C9RDJT6T3UaJRdQb+4VczcCFw88JP G8Lw== X-Gm-Message-State: AOAM531oUL0Pmw68+DtmthN4OPWX9ZCRkQKij0dZKdl+ohEvWKr93Xap CbqtNsB7Fy+xRdAdH33LeNW3SoIcRj9fkgsfZIjl1Ck= X-Google-Smtp-Source: ABdhPJxcRXzxlHvZpTH6Tr3T5QJhvA6ULYtgCXOfLR4RClbeajIHGzTPvgaU1uLVvw1EBFmkwwAE1csjixfXcsVtIaw= X-Received: by 2002:adf:ab50:: with SMTP id r16mr20681901wrc.194.1595876680694; Mon, 27 Jul 2020 12:04:40 -0700 (PDT) MIME-Version: 1.0 References: <1FEAF281-437D-429D-9859-BE883905CB8A@arivibes.com> In-Reply-To: From: Jeff Learman Date: Mon, 27 Jul 2020 15:04:30 -0400 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1k08QZ-001Mfh-5D Subject: Re: Piping output of sox to a file produces empty text X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Type: multipart/mixed; boundary="===============7664408405036648136==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============7664408405036648136== Content-Type: multipart/alternative; boundary="000000000000a87f9705ab70fef0" --000000000000a87f9705ab70fef0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Should have added: If it's working correctly, you won't see the output. What that stuff on the end means is, send stdout to file.txt, and make fd 2 (which is stderr) a copy of fd 1 (which is stdout). On Mon, 27 Jul 2020 at 15:02, Jeff Learman wrote: > I didn't check, but perhaps sox text output is going to stderr. For > Linux/UNIX, using many shells (sh, ksh, tsh, zsh, bash, but not csh), > redirect stderr this way: > > sox file.mp3 -n stat > file.txt 2>&1 > > Jeff > > On Mon, 27 Jul 2020 at 14:49, Ariel Elkin wrote: > >> Hello, >> >> I=E2=80=99d like to save the output of the stat command to a file. >> >> When I call >> sox file.mp3 -n stat >> >> The output is correctly displayed. But If I then do >> sox file.mp3 -n stat > file.txt >> >> file.txt is empty. >> >> Why? >> >> Thanks >> >> Ariel >> >> _______________________________________________ >> Sox-users mailing list >> Sox-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/sox-users >> > --000000000000a87f9705ab70fef0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Should have added:

If it'= ;s working correctly, you won't see the output.
What that stu= ff on the end means is, send stdout to file.txt, and make fd 2 (which is st= derr) a copy of fd 1 (which is stdout).


=

= On Mon, 27 Jul 2020 at 15:02, Jeff Learman <jjlearman@gmail.com> wrote:
I didn't check, but= perhaps sox text output is going to stderr.=C2=A0 For Linux/UNIX, using ma= ny shells (sh, ksh, tsh, zsh, bash, but not csh), redirect stderr this way:=

sox file.mp3 -n stat > file.txt 2>&1

Jeff

<= div dir=3D"ltr" class=3D"gmail_attr">On Mon, 27 Jul 2020 at 14:49, Ariel El= kin <ariel@arivi= bes.com> wrote:
Hello,

I=E2=80=99d like to save the output of the stat command to a file.

When I call
sox file.mp3 -n stat

The output is correctly displayed. But If I then do
sox file.mp3 -n stat > file.txt

file.txt is empty.

Why?

Thanks

Ariel

_______________________________________________
Sox-users mailing list
Sox-us= ers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s= ox-users
--000000000000a87f9705ab70fef0-- --===============7664408405036648136== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============7664408405036648136== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users --===============7664408405036648136==--