Is there a way to get find
to execute a function I define in the shell? For example:
dosomething () {
echo "doing something with $1"
}
find . -exec dosomething {} \;
The result of that is:
find: dosomething: No such file or directory
Is there a way to get find
's -exec
to see dosomething
?
I find the easiest way as follow, repeating two commands in single do