http://phecoopkj4ytf3fokcfvykymg7zuhkwsoqbh5dgnwwee423delgexyqd.onion/page-2212240042-Have-the-find-Command-Invoke-A-Custom-Shell-Function-BASH.html
It's pretty useful, but sometimes you want to be able to have it invoke a custom function, which it can't do without a little bit of tweaking This snippet details how to have find invoke a custom shell function against each matching result, the example uses BASH but the same should be possible with ZSH, DASH, ASH, KSH etc Snippet # Define your function
function doSomething(){
file=${1# " ./ " }
do_something_to $file
}
# Export the function
# so that it's available to find
export -f...