bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find . -exec TURNIP{} +


From: James Youngman
Subject: Re: find . -exec TURNIP{} +
Date: Thu, 21 Oct 2010 10:31:31 +0100

On Wed, Sep 15, 2010 at 10:32 AM, Geoff Clare <address@hidden> wrote:
> I wrote, on 04 Sep 2010:
>>
>> Eric Blake <address@hidden> wrote, on 03 Sep 2010:
>> >
>> > However, it also means that we have to think about this case:
>> >
>> > find . -exec TURNIP{} {} +
>
>> Perhaps we should raise this on the Austin Group mailing list.
>
> I have submitted it as bug 309.

I notice that the bug now has a response too:
http://austingroupbugs.net/view.php?id=309

As far as I understand note 562 attached to that bug (I have a copy of
draft 5.1, but the line numbers do not seem to correspond, so I'll
need to check for an updated version):

1. If "{}" occurs more than once in the arguments to -exec, the
behaviour is unspecified.
2. If "{}" occurs in an argument but the argument is not exactly "{}",
there are two options:
 a. The argument is used, unchanged
 b. The argument is substituted
... and we must document which will occur.  [I have a preference for 2a]

Bug 310 is also relevant.  It deals with this question of how this
should be interpreted:

find -exec utility1 arg arg2 arg4 arg5{} + -exec utility2 arg6 {} +

The options are
 (i) utility1 is invoked with a number of arguments, one of which is
utility2.   utility2 is not invoked by find.
 (ii) utility1 and utility2 are both invoked.   The final argument
passed to utility1 is either substituted or not, and this is
implementation defined (as for note 562).
However, as far as I can see there is no resolution yet for bug 310,
so I don't know whether we should be implementing (i) or (ii).
Either way, the current implementation of GNU find at the current HEAD
revision rejects the construct, which is wrong.    The current
behaviour would only be acceptable if the Austin Group selects (i) in
cases like "find -exec utility1 arg arg2 arg4 arg5{} +" (and there are
no more arguments).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]