On Mon, July 21, 2008 12:07 pm, Anthony Parks wrote:
> hi im currently writing a bash script to take each subdirectory of .vob
> files in a film directory and shrink each subdirectory into an *.iso that
> can fit onto a single-layer DVD-R using k9copy's command-line parser. how
> do
> i loop through subdirectories using a "for" iterative construct?
>
> although this doesnt work, the code below should give anybody some idea of
> what i'd like the script to do:
>
> for dir in dirs
> do
> k9copy --input $PWD --output '$PWD'+".iso"
> done
$ ls
dir1/ dir2/ file1 file2
I assume you want to process all directories, but not any files.
$ for D in */; do k9copy --input "$D" --output "$D.iso"; done
Alternatively, you can use "find" to select files and directories more
precisely (like at different depths, etc):
$ find . -mindepth 1 -maxdepth 1 -type d -exec \
k9copy --input "{}" --output "{}.iso" \;
-Frank
--
----------------------------------
Frank Wallingford
[EMAIL PROTECTED]
_______________________________________________
Mid-Hudson Valley Linux Users Group http://mhvlug.org
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug
Upcoming Meetings (6pm - 8pm) MHVLS Auditorium
Jun 4 - Sqeak! and eToys
Jul 2 - KVM (Tenative)
Aug 6 - Zenos
Sep 3 - TBD