As Theo said already, the main issue there is that it's totally
non-standard, so you end up writing scripts that won't work
anywhere but on OpenBSD.

The problem you're trying to solve is quoting in shell.
It's basically broken by design. There will always be fun patterns
in names that do various fun things in shell.

the find -print0 / xargs -0 couple was designed to solve that problem
a long time ago in one specific case.

Yep, it does not play with filters in the middle.

So what ? you can create a list with the specific case of *newlines* using
lots of shell constructs

e.g., find . | while read i; do ...; printf "$i\0"; done|xargs -0
is yet another way to skin this cat.

In general, when I need to do this kind of things, I get a "scripting"
language that doesn't have any of those issues, for instance perl.

Reply via email to