find and execute a command
find . -name "*.txt" -exec echo {} \; -exec grep banana {} \;
Source: stackoverflow.com
find and execute a command
multiple_cmd() { tail -n1 $1; ls $1 }; export -f multiple_cmd; find *.txt -exec bash -c 'multiple_cmd "$0"' {} \;
Source: stackoverflow.com
find and execute a command
find . -type d -exec sh -c "echo -n {}; echo -n ' x '; echo {}" \;
Source: stackoverflow.com
find and execute a command
find ... | while read -r file; do echo "look at my $file, my $file is amazing"; done
Source: stackoverflow.com