> From: yyy@xxxxxxxxxxx (Geoff Clare)
> Date: Tue, 27 Mar 2001 12:07:19 +0100
> Although I think -xargs is better, I think it's more important to
> stick to the existing behaviour.
I'm not so sure of that. The existing behavior is not documented in
the most popular SVR4 implementation (namely Solaris), and the
behavior doesn't always follow the documentation available in other
SVR4 implementations. For example:
find / -prune '(' -exec echo {} + ')'
doesn't work as documented: it reports an error instead. In practice,
the proposed behavior doesn't work except in extremely limited and
somewhat mysterious circumstances.
> Also, if the question of whether "-exec ... +" is allowed as an
> extension
I don't see how it can possibly be allowed as an extension under the
current standard. The example:
find / -prune -exec echo {} + -exec echo FOO ';'
shows that the proposed behavior is incompatible with the behavior
required by the current standard.
The only way that I can see it as a pure extension, is to say that the
new behavior applies only if the last two arguments are "{}" "+", or
if no argument after the "+" is ";", or some weird restriction like
that. But this is piling hack on top of hack, and is departing even
further from the (flawed) SVR4 implementation. Surely we can do
better than that.
> I can't see the vendors of SVR4-derived systems agreeing to remove
> this feature from their find commands.
I can. They have to, to conform to the current standard. Tell you
what: I'll file a bug report or two and see what happens.
> You have raised some valid points, and I agree with most of them.
> I will incorporate the appropriate parts of your changes into my
> suggested solution and send it to the POSIX.2 interps reflector.
What reflector is that? Sorry, I'm not plugged into it. I'd like to
see your revised solution, whenever it's available. (Perhaps I can
talk you into -xargs eventually. :-)
|