Re: Piping output of sox to a file produces empty text
Jeff Learman <[email protected]>
| Newsgroups | gmane.comp.audio.sox |
|---|---|
| Message-ID | <CAGyjer6rYE0_Ngo34j3TX39RqAnZA5rR3agaoPKrNJc=CvX07g@mail.gmail.com> |
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 <[email protected]> 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 <[email protected]> wrote: > >> Hello, >> >> I’d 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 >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/sox-users >> > _______________________________________________ Sox-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sox-users