Re: Piping output of sox to a file produces empty text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Learman <jjlearman@xxxxxxxxx> writes:

>> On Mon, 27 Jul 2020 at 14:49, Ariel Elkin <ariel@xxxxxxxxxxxx> 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?
>
> 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

Per the man page, "The information is output to the `standard error'
(stderr) stream."

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux