bugfindutils - Bugs: bug #10771, Primary -exec lacks support for...

 
 

bug #10771: Primary -exec lacks support for POSIX idiom "{}+" (the plus sign)

Submitter:  James Youngman <jay>
Submitted:  Fri 22 Oct 2004 07:14:22 PM UTC
   
 
Category:  find Severity:  1 - Wish
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.2.1 Fixed Release:  4.2.12
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 15 Jan 2005 11:07:41 AM UTC, comment #2: 

This problem is fixed in the CVS code for findutils.
To resolve your problem, you could either wait for the
next official release of findutils, or check out a copy
of the code from the CVS repository for findutils.

James Youngman <jay>
Group administrator
Fri 22 Oct 2004 07:47:57 PM UTC, comment #1: 

For the moment the documentation has been updated to indicate that this variant is not supported.

James Youngman <jay>
Group administrator
Fri 22 Oct 2004 07:14:22 PM UTC, original submission:  

From http://www.opengroup.org/onlinepubs/009695399/utilities/find.html


-exec  utility_name  [argument ...]   {} +
    The end of the primary expression shall be punctuated by a semicolon or by a plus sign. Only a plus sign that follows an argument containing the two characters "{}" shall punctuate the end of the primary expression. Other uses of the plus sign shall not be treated as special.

    If the primary expression is punctuated by a semicolon, the utility utility_name shall be invoked once for each pathname and the primary shall evaluate as true if the utility returns a zero value as exit status. A utility_name or argument containing only the two characters "{}" shall be replaced by the current pathname.

    If the primary expression is punctuated by a plus sign, the primary shall always evaluate as true, and the pathnames for which the primary is evaluated shall be aggregated into sets. The utility utility_name shall be invoked once for each set of aggregated pathnames. Each invocation shall begin after the last pathname in the set is aggregated, and shall be completed before the find utility exits and before the first pathname in the next set (if any) is aggregated for this primary, but it is otherwise unspecified whether the invocation occurs before, during, or after the evaluations of other primaries. If any invocation returns a non-zero value as exit status, the find utility shall return a non-zero exit status. An argument containing only the two characters "{}" shall be replaced by the set of aggregated pathnames, with each pathname passed as a separate argument to the invoked utility in the same order that it was aggregated. The size of any set of two or more pathnames shall be limited such that execution of the utility does not cause the system's {ARG_MAX} limit to be exceeded. If more than one argument containing only the two characters "{}" is present, the behavior is unspecified.

    If a utility_name or argument string contains the two characters "{}", but not just the two characters "{}", it is implementation-defined whether find replaces those two characters or uses the string without change. The current directory for the invocation of utility_name shall be the same as the current directory when the find utility was started. If the utility_name names any of the special built-in utilities (see Special Built-In Utilities), the results are undefined.

James Youngman <jay>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-01-23 jay Open/ClosedOpen Closed
    Fixed ReleaseNone 4.2.12
2005-01-15 jay StatusNone Fixed
2005-01-15 jay Carbon-Copy- Added -email is unavailable-
2004-12-05 jay Fixed Release4.2.0 None
2004-10-22 jay Originator Email -email is unavailable-

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code