I have split a large text file into a number of sets of smaller ones for performance testing that i\'m doing. There are a number of directories like this:
/h
As others have suggested, use find(1):
# Find all files named 'myfile.chunk.*' but NOT named 'myfile.chunk.*.processed'
# under the directory tree rooted at base-directory, and execute a command on
# them:
find base-directory -name 'output.*' '!' -name 'output.*.processed' -exec ./myexecutable -i '{}' -o '{}'.processed ';'