On Mon, Nov 16, 2020 at 09:04:53AM +0100, Paul de Weerd wrote: > Hi Alexander, > > On Sun, Nov 15, 2020 at 10:22:32PM +0100, Alexander Hall wrote: > | I googled for "POSIX find", and hit this: > | > | https://pubs.opengroup.org/onlinepubs/009695399/utilities/find.html > | > | => "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." > > Yep, I also found that when looking into this. It's unforunate, as it > implies you can't use `-exec {} ... +` with e.g. ln, mv or cp, but oh > well. > > (also, nitpicking, 'an argument containing the two characters "{}"' > includes an argument like "hh}hh{hh", which I'm pretty sure is not > what they mean) > > | What you do in your diff is exactly that, treating it special. > > I'm not sure I agree. I make sure I do not treat it special unless ^^^^^^ > it's at the end of the argument to 'exec'. Can you elaborate on what ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > you mean here?
If it is not following {}, then it should not be treated as such. You are assuming (or guessing) it was meant to be that special '+'. Carefully crafted example of failing quoting of ';': $ obj/find . -exec echo + ; # Just print a '+' for every entry find: -exec: "+" should follow {} The more I read and think about it, I feel the original error message is actually correct in that there is no terminating ";" or "+", since the required condition for it is not fullfilled... /Alexander > > Thanks! > > Paul > > -- > >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+ > +++++++++++>-]<.>++[<------------>-]<+.--------------.[-] > http://www.weirdnet.nl/ >