Article 5R3JN parsing output from sox to variables?

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,
babaglatest?d=yIl2AUoC8zA latest?i=gniTPXNtj20:tDP7k3_Jo70:F7zBnMy latest?i=gniTPXNtj20:tDP7k3_Jo70:V_sGLiP latest?d=qj6IDK7rITs latest?i=gniTPXNtj20:tDP7k3_Jo70:gIN9vFwgniTPXNtj20
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments