Enhance feedback of missing argument to -exec
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
findutils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Invoking a wrong `find` command, e.g. `find . -name pom.xml -exec grep '<repository>' {}+` causes the error message `find: missing argument to `-exec'` which could be more helpful if the error message would reflect the correct usage, e.g `find: missing argument to `-exec <arg> {}+'`.
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: findutils 4.4.2-9
Uname: Linux 3.19.0-
ApportVersion: 2.14.7-0ubuntu8.1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Feb 16 19:28:45 2015
Dependencies:
gcc-4.9-base 4.9.1-16ubuntu6
libc6 2.19-10ubuntu2.2
libgcc1 1:4.9.1-16ubuntu6
multiarch-support 2.19-10ubuntu2.2
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-01-26 (20 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
SourcePackage: findutils
UpgradeStatus: No upgrade log present (probably fresh install)
Did you notice, that you need a blank before the plus sign?
$ find . -name pom.xml -exec grep '<repository>' {}+
$ find . -name pom.xml -exec grep '<repository>' {} +
For example, if find finds the files a/pom.xml and b/pom.xml, it will try to build the exec part as:
$ grep '<repository>' a/pom.xml b/pom.xml+
instead of
$ grep '<repository>' a/pom.xml b/pom.xml
leaving the + for find as special option.