find and execute a command
multiple_cmd() {
tail -n1 $1;
ls $1
};
export -f multiple_cmd;
find *.txt -exec bash -c 'multiple_cmd "$0"' {} \;
find and execute a command
multiple_cmd() {
tail -n1 $1;
ls $1
};
export -f multiple_cmd;
find *.txt -exec bash -c 'multiple_cmd "$0"' {} \;
find and execute a command
find . -name "*.txt" -exec echo {} \; -exec grep banana {} \;
find and execute a command
find ... | while read -r file; do
echo "look at my $file, my $file is amazing";
done
find and execute a command
find . -type d -exec sh -c "echo -n {}; echo -n ' x '; echo {}" \;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us