tcprobe+grep+cut
I am trying to grep/cut output from tcprobe in order to have only the framerate. i am able to do so fine to get the video length like this:
tcprobe -i /dev/dvd 2>&1 -T "1" | grep "playback" | cut -d " " -f 5 >> 00:00:28.29 but any attempt to cut the following grep results in no output whatsoever: tcprobe -i /dev/dvd 2>&1 -T "1" | grep "rate" >> frame rate: -f 23.976 [25.000] frc=1 (*) I would like to have just "23.976" in the end but i cant cut it :/ Any help appreciated....thanks |
Well, unless there's something you haven't mentioned, this worked for me:
t='frame rate: -f 23.976 [25.000] frc=1 (*)' echo $t | cut -d' ' -f4 output was: 23.976 I don't have tcprobe, so I couldn't do it from scratch.... |
All times are GMT -5. The time now is 10:14 PM. |