Thank you for opening this bug and helping make Ubuntu better. This had me stumped for a while, and I queried about it (all the while with this firm believe the answer was staring at me). And I did get an answer. Indeed, this is not a bug, but normal shell processing...
Here's the deal: when you have a $(...) construct, the contents are passed to the shell. Shell variables are resolved as usual, and the rest is left as is. It happens that '{}' is *not* a shell variable -- so it is left as is. *When* the shell returns... then '{}' gets to be magic again, and -exec processing replaces it by the correct value. This can be easily seen by running the following: echo find . -type f -exec echo $(basename {}) \; As such, marking Invalid. p.s. And I *knew* I was missing the answer ;-) -- Thank you, Bob! ** Changed in: coreutils (Ubuntu) Status: New => Invalid -- basename problems with xargs/find and command substitution https://bugs.launchpad.net/bugs/523453 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs