parsing output from sox to variables?
by babag from LinuxQuestions.org on (#5R3JN)
i have this line:
Code:sox 27_TitleHere_Ch27.mp3 -n stats 2>&1 | sed -n 's#^Length s[^0-9]*\([0-9.]*\)$#\1#p'which, in this case, returns this:
Code:1008.327how do i get that value into a variable? i'd like to be able to print something like:
Code:echo duration : $variableand have it print:
Code:duration : 1008.327thanks,
babag
Code:sox 27_TitleHere_Ch27.mp3 -n stats 2>&1 | sed -n 's#^Length s[^0-9]*\([0-9.]*\)$#\1#p'which, in this case, returns this:
Code:1008.327how do i get that value into a variable? i'd like to be able to print something like:
Code:echo duration : $variableand have it print:
Code:duration : 1008.327thanks,
babag