dev/bash/find/find_bash_function.sh

17 lines
281 B
Bash
Executable File

#!/bin/bash
function myFunction() {
echo some command on file $1
}
#~ myFunction aAA
export -f myFunction
find ~/tmp/ -exec bash -c 'myFunction {}' \;
#~ find ~/tmp/ -exec sh -c \
#~ "function MyFunction() { \
#~ echo some command on file \$1; \
#~ }; \
#~ MyFunction {}" \;