Performing script repeatedly on all files meeting a criterion
by velocityvgc from LinuxQuestions.org on (#51R66)
I want to perform a script on any number of files that do not have a .done suffix. In this case, my files have some values that I want to source and pass to a script.
My script looks something like this
Code:source #files that don't have .done suffix
/home/username/script_to_call #pass values from file aboveHow do I
1) source files that don't have a .done suffix
2) repeatedly perform /home/username/script_to_call on each file
Note that script_to_call is meant to only take in one file's values at a time (not all files' values at once). I want to perform script_to_call once for each file that does not have the .done suffix, essentially looping through all the sourced files.


My script looks something like this
Code:source #files that don't have .done suffix
/home/username/script_to_call #pass values from file aboveHow do I
1) source files that don't have a .done suffix
2) repeatedly perform /home/username/script_to_call on each file
Note that script_to_call is meant to only take in one file's values at a time (not all files' values at once). I want to perform script_to_call once for each file that does not have the .done suffix, essentially looping through all the sourced files.