I often use find to run the same script on a bunch of files. So for example if I want to run process.py on all the .png files in dir, I would do:
find dir -name '*.png' -execdir process.py \{\} \;
The picket fence thing in the end is annoying, any way around it?
Depending on your keyboard layout,
"might be more convenient to use than'or\. The{}does not need escaping, as far as the Unix & Linux Stack Exchange site knows. Nobody could identify a shell that would need{}escaped, and the examples in the man page do not escape the braces.Jonathan Leffler has a solution with + in the end, which is not identical in semantics, but often usable.