LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 08-23-2004, 01:47 PM   #1
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Rep: Reputation: 30
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
 
Old 08-24-2004, 06:27 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
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....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DVD::Rip tcprobe error while loading libquicktime secretlydead Linux - Software 0 11-27-2005 11:13 AM
grep ?? can grep us variables? DaFrEQ Linux - Software 4 09-14-2005 01:22 PM
cut , paste or grep ziox Programming 1 12-15-2004 11:51 PM
"Undeleting" data using grep, but get "grep: memory exhausted" error SammyK Linux - Software 2 03-13-2004 04:11 PM
ps -ef|grep -v root|grep apache<<result maelstrombob Linux - Newbie 1 09-24-2003 12:38 PM


All times are GMT -5. The time now is 05:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration