Quote:
Originally Posted by velocityvgc
Does this method source the files in the same way source does?
|
No, it doesn't. I'm afraid I misunderstood what you wanted. You should write a wrapper script, pass a file name as parameter to it, source this file from inside it, then call
script_to_call with prepared flags and parameters. This
wrapper_script is what you're calling in the find command:
Code:
find -type f -not -name \*.done -execdir wrapper_script {} \;
Alternatively, you may try invoking
sh -c in the -execdir action of find:
Code:
find ... -execdir sh -c '. "$0"; ...' {} \;