LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-03-2004, 01:20 AM   #1
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Rep: Reputation: 30
Script to Run the Same Commands on a List of Files


Heyas,

I want to get my DVD burner working on Linux and I found a website that tells you how to author DVDs using Linux programs. (http://mightylegends.zapto.org/dvd/dvdauthor_howto.php) I was wondering how I would go about writing a script that would take the commands I need to perform on my video files and do those commands on an entire folder of files. I have many music videos and live shows from bands that are mostly split up by song, so it would be a lot more convienent to be able to write a script that will convert the files into DVD compatible files that I could run and let it go on its own.

Thanks,
Chris
 
Old 10-03-2004, 08:34 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You could use something like:
for file in `ls`;do somecommand arguments $file;done

This assumes that you run the command in the directory with the files, the command is "somecommand" and that $file should be changed for the real file name.
 
  


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
Help to create a script to open a terminal and run commands in it. Brian1 Linux - Software 6 02-07-2005 06:46 PM
run script on multiple files statmobile Programming 6 07-16-2004 11:35 PM
Creating a script to run two commands anjaan Programming 11 06-15-2004 02:51 AM
Script files and global commands... LinuxBAH Linux - Software 6 06-25-2003 12:38 AM
run 2 commands in a script ddpicard Linux - General 10 06-13-2003 04:50 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:08 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
Open Source Consulting | Domain Registration