tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: find -exec ... +
On Tue, Dec 21, 2010 at 03:39:47PM +0200, Alan Barrett wrote:
> > but not
> >
> > % find foo -exec mv {} subdir/ +
>
> Right. See
> <http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-210.html>
> for the rationale:
>
> " Note that the "+" is only treated as special if it immediately
> " follows "{}". This minimises the chances of causing problems with
> " existing uses of "+" as an argument with "-exec".
>
> Note "minimises", not "eliminates", problems with the use of "+"
> inside a command used with "-exec ... \;".
Right.
> > our find has a bug so it doesn't enforce this, so it breaks anyway:
>
> We should fix that.
Ok, I just committed the fix (which is a one-liner).
> A new "-mexec" primary would not have such a problem; it could just use
> ";" as the terminator, allow "{}" anywhere, and treat "+" as not being
> special.
That's probably the way to go. It shouldn't be that difficult to code
up...
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index