[Top][All Lists]

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

[bug #18554] feat req: -exec cmd {} more args +

From: Geoff Clare
Subject: [bug #18554] feat req: -exec cmd {} more args +
Date: Fri, 22 Dec 2006 11:54:41 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv: Gecko/20061025 Firefox/

Follow-up Comment #6, bug #18554 (project findutils):

POSIX definitely only allows + to be special when it immediately follows {}. 
I can see that because the text doesn't say "immediately follows" it could be
misinterpreted, but the requirement is clear from the specified form of the

-exec utility_name [argument ...] ;
-exec utility_name [argument ...] {} +

The reason it was done that way was to minimize the chances of breaking
existing uses of -exec of the form:

find ... -exec utility [args]... {} args... + [args]... \;

The POSIX rationale gives an example command that would still be broken even
with the rules as they are, but the hope was that such uses were very rare.

If there is a need to have arguments after the aggregated ones this can
easily be accomplished using "sh -c":

find startpoint -tests ... -exec sh -c 'scp "$@" remote:/dest' sh {} + 

The current draft of the next revision of POSIX.1 includes an example on the
find page that shows this kind of usage.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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