LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-30-2008, 04:39 AM   #1
csaba1985
LQ Newbie
 
Registered: Jan 2008
Posts: 4

Rep: Reputation: 0
Script Help for movie indexing


Hi
I have a server and there a folder like /var/video/.In this folders are movies like AnInconvenientTruth-VMO0001.ts,Shrek3-VMO00002.ts...and so one.I have to index all the movies like the command line:
/opt/dip/sbin/rave_indexer moviename.I wish to create a script that can finde which file hasn't got a .I and Idx file and indexed it.The other problem is that i have to create an entrance for them likepen /etc/rave/rave.conf with nano,vi and there
aninc:/var/video/AnInconvenientTruth-VMO0001.ts
shrek3:/var/video/Shrek3-VMO00002.ts
I wondered if it's possible to cut the only valuable info-"VMO00002" with a script and then insert it in rave.conf like
VMO000002:/paste the place for the movies like/var/movies and then the file
THe script shold ask me :
1)The place of the movies:/var/movies or other place
2)Then if i want to find files without .I or .Idx and indexed them
3)What files i want to add to rave.conf
Thanks ahead and have a great day.
 
Old 04-30-2008, 05:22 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by csaba1985 View Post
I wish to create a script that
Then you want to read some scripting guides like
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://www.tldp.org/LDP/Bash-Beginne...tml/index.html
If you can't or won't do that, and you can't provide pseudocode, then you're basically asking your fellow members to create the script for you at which point I think you should edit your question so it reads "please create script for me".


Quote:
Originally Posted by csaba1985 View Post
can finde which file hasn't got a .I and Idx file
Could use 'find', then 'test' to see if for any filename.ts there is a "${filename%.ts}.ldx".


Quote:
Originally Posted by csaba1985 View Post
create an entrance
Probably 'sed -i'.


Quote:
Originally Posted by csaba1985 View Post
I wondered if it's possible to cut the only valuable info-"VMO00002" with a script and then insert it in rave.conf like
Sure "${filename//*-}". Inserting probably is 'sed -i' again.


Quote:
Originally Posted by csaba1985 View Post
THe script shold ask me :
1)The place of the movies:/var/movies or other place
Use 'getopts'.


Quote:
Originally Posted by csaba1985 View Post
2)Then if i want to find files without .I or .Idx and indexed them
"Read" with a test.


Quote:
Originally Posted by csaba1985 View Post
3)What files i want to add to rave.conf
Same.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to play random movie file Nonc Programming 2 11-26-2007 10:22 AM
300 Spartans movie great movie pazzibazi Linux - General 1 04-12-2007 02:00 PM
Creating a dvd movie out of different movie files.. memo007 Linux - Software 4 04-10-2007 10:21 PM
Firefox problem: "a script in this movie is causing MM-Flashplayer7 to run slow" oskar Linux - General 2 09-05-2006 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:24 PM.

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
Open Source Consulting | Domain Registration