I have a directory with a lot of scripts to generate figures. All the scripts match the pattern fig*-gen.sh
I would like to have a bash script (named allfig-gen.sh) to invoke all figure generation scripts. How can I do this?
|
feedback
|
|
bash internals:
via (gnu)find:
| |||
|
feedback
|
|
Unless the scripts require parameters or require to be called in a specific order, you should be able to achieve this via a simple loop
Caveat:
For this to work, the | |||
feedback
|
|
Instead of a for-loop, you can use find:
| |||
|
feedback
|
|
If you want them run in parallel and if you have GNU Parallel http:// www.gnu.org/software/parallel/ installed you can do this:
or even this:
Watch the intro video for GNU Parallel to learn more: http://www.youtube.com/watch?v=OpaiGYxkSuQ | |||
|
feedback
|