avoiding xargs
Why spawn a copy of perl for each file?
$ find . -maxdepth 1 | xargs perl -le 'print "$$: my args: @ARGV"' 12390: my args: . ./bash ./rbash ./sh ./cat ./chgrp ./chmod ./chown ./ +cp [...]
$ find . -maxdepth 1 -exec perl -le 'print "$$: my args: @ARGV"' {} \; 12399: my args: . 12400: my args: ./bash 12401: my args: ./rbash 12402: my args: ./sh 12403: my args: ./cat 12404: my args: ./chgrp 12405: my args: ./chmod 12406: my args: ./chown 12407: my args: ./cp [...]
--
David Serrano
In reply to (OT) Re^2: Find and Replace text script?
by Hue-Bond
in thread Find and Replace text script?
by bobafifi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |