Search code examples
linuxconsoleio-redirectionsoundtouch

save console output of programm to file - not simplte 2>&1


i want to analyze multiple mp3 files and get the bpm of the files. Therefore i'm using soundstretch. At first i'm converting the mp3 files using sox

sox -t mp3 -r 44100 -c 2 file.mp3 -t wav file3.wav

after this i want to analyze the track with soundstretch

soundstretch file.wav -bpm

this also gives me the result in the console. But i'm not able to redirect the printed response to a file. i already tried stuff like

soundstretch file.wav -bpm > file.mp3.bpm
soundstretch file.wav -bpm 2>&1 > file.mp3.bpm

the only result is, that the messages are displayed in the console and there is a empty file


Solution

  • Switch it around if you want one file

    soundstretch file.wav -bpm > file.mp3.bpm  2>&1
    

    or use two file two files:

    soundstretch file.wav -bpm 2> file.mp3.err > file.mp3.bpm