Email List: Xaustin-group-lX
[All Lists]

Re: find + xargs

To: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Re: find + xargs
From: Paul Eggert <yyyyyy@xxxxxxxxxxx>
Date: Sat, 24 Mar 2001 19:07:29 -0800 (PST)
References: <200103240817.JAA26060@burner.fokus.gmd.de>
> From: yyyyyyyyy@xxxxxxxxxxxx
> Date: Sat, 24 Mar 2001 09:17:16 +0100 (MET)
> 
> It is not in the man page but it works just fine on Solaris 8
> Maybe you have problems with your shell?

No, I just used a different command than you did, and my usage didn't
encounter the (undocumented) behavior of Solaris 8 find.

Here's an example of why Solaris 8 find's behavior is incompatible
with the current POSIX standard:

find / -prune -exec echo {} + - ';'

POSIX requires this to print "/ + -" but Solaris 8 find prints an
error diagnostic instead.  Admittedly this is a contrived example but
I can see the possibility of real scripts running into compatibility
problems with this incompatible change to "find".  I'm not saying that
I oppose the entire idea; it's just that the SVR4 syntax is not
compatible with POSIX, and that is a strike against it.

I still favor the GNU extension of NUL termination instead.  It's more
reliable in the presence of multiple locales and encoding errors, and
it's easier to explain.  Perhaps that's why it is documented and the
Solaris behavior is not.

<Prev in Thread] Current Thread [Next in Thread>