Ask HN: Help with BASH Scripting?
I pass in a path and a file name and the script takes that info and encodes the video several ways, then renames some files and copies to a final destination path. Not so hard.
What I cannot figure out for the life of me is can I provide a file for my bash script to pull my paths, file names and destinations from and just mass add files all day to the single file and then run the script to encode overnight.
Example have a file that has in it.
orignal path, file name, destination path
orignal path, file name, destination path
orignal path, file name, destination path
orignal path, file name, destination path
and I run a script that parses each line, does the encodes and copies for it, then moves to the second line when the first is done and moves to the third, etc, etc
Lastly, is it possible to automate MySQL Insert statements with BASH. I supposes at the very least I could create the insert statements in batch from the parameters and output them to a file containing the SQL and manually execute it in the morning....
Can anyone provide insight on how use a file with all my paths and parameters? OSX 10.6.