Created
August 16, 2019 02:16
-
-
Save renier/322a65157ca31fcbcaf3788228c8c7f7 to your computer and use it in GitHub Desktop.
Execute commands on all found files even if they have spaces and quotes in their names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read f; do | |
$(cmd) -- "${f}" | |
done < <(find . -name "*.ext" -print0 | xargs -0 -n1 grep -Hsl "foobar") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment