Recently Written · git

tmpl

Insanely simple templates

git clone https://github.com/equwal/tmpl

Log | Files | Refs


sh/find-xargs (354 bytes)

1 # -print0/-0 is a GNU extension
2 # Whitespace-quoting solution
3 #         quote in-arg whitespace
4 find <++> | sed 's/./\\&/g' | xargs <++>
5 
6 # POSIX + solution
7 if find /dev/null -exec true '{}' + ; then # POSIX '+' support?
8     find <++> -exec <++> '{}' + # POSIX hack fills command line
9 else
10     find <++> -exec <++> '{}' \; # slower if + not supported
11 fi