Compile Multiple Files

Hi All,

I need a script to compile multiple *.pli source files.

I can take care of the compile part, it's getting the list of files into an array or parsable string that I'm having the difficult with.

ls or find come to mind, but I can only redirect those to a file. I need to use the file list internally.

Thank You in Advance for Your Help,

Lou

for i in `find . -name *.pli`
do
....
compile compile_flags $i
....
done

find /dir/to/start/with -name "*pli" -exec cmd_to_compile {} \;

"{}" will be expanded to every filename found this way, so if there are 3 files, a.pli, b.pli and c.pli "cmd_to_compile" will be called 3 times:

cmd_to_compile a.pli
cmd_to_compile b.pli
cmd_to_compile c.pli

This is not recommended, though. I'd suggest you take a look at the output of "man make" and proceed from there.

bakunin