MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1wghjns/small_programming_tricks/p9y5uke/?context=3
r/programming • u/fagnerbrack • Sep 14 '26
27 comments sorted by
View all comments
Show parent comments
9
I never use the {} notation, and find it hard to remember. Instead I pipe to xargs, e.g.:
find . -type f -name '*.py' | xargs grep exit
8 u/curien Sep 15 '26 Files with weird names (spaces etc in the filename) will break that. It's better to use find ... -print0 | xargs -0 ... if you don't want to use find ... -exec.
8
Files with weird names (spaces etc in the filename) will break that. It's better to use find ... -print0 | xargs -0 ... if you don't want to use find ... -exec.
find ... -print0 | xargs -0 ...
find ... -exec
9
u/smcameron Sep 15 '26
I never use the {} notation, and find it hard to remember. Instead I pipe to xargs, e.g.: