Hello, On Tue, 29 Apr 2014, Anton Aylward wrote:
That's why I use "-print0" and "xargs -0"
Use: find . [...] -exec sh -c 'shellscript' find-sh {} + That's fast, portable and handles all filenames correctly. If you got a lot / weird stuff in "shellscript", use an actual external (temporary) script. In both cases, you get filenames in "$@", so you can iterate over them in the usual way, i.e. for file in "$@"; do ... ;done ### portable POSIX sh for file; do ... done ### bash (and others?) so, it could e.g. look like this: find . -type f -exec \ /bin/bash -c 'for f; do echo ">>$f<<"; done; echo =====;' find-sh {} + ^^^^^^^ this becomes "$0" to be seen in 'ps' output with the 'echo =====' you'll see what batches find called the sh-script with. HTH, -dnh -- / "I think the key is finding a spousish unit who shares the \ [ tendency to sit for hours at a time reading and typing for ] \ no perceptible reason." -- Bill Cole / -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org