[Bug 229481] find(1) fails to expand {} with preceding/following non-whitespace, as specified by man page
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Jul 3 04:02:58 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229481
Bug ID: 229481
Summary: find(1) fails to expand {} with preceding/following
non-whitespace, as specified by man page
Product: Base System
Version: 11.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: stilezy at gmail.com
Expected behaviour (from "man find"):
"Historic implementations of the -exec and -ok primaries did not replace the
string '{}' in the utility name or the utility arguments if it had preceding or
following non-whitespace characters. This version replaces it no matter where
in the utility name or arguments it appears."
However this doesn't seem to be the case with execdir or exec. Example 1:
# /usr/bin/find . -maxdepth 1 -exec echo "(result):" {} \;
(result): .
(result): ./dir 1
(result): ./dir 2
(result): ./dir 3
# /usr/bin/find . -maxdepth 1 -exec echo "(result):"{} \;
(result):
(result):
(result):
(result):
However it does seem to work correctly within quotes. Example 2:
# /usr/bin/find . -maxdepth 1 -execdir echo "RENAMED_FROM_{}" \;
RENAMED_FROM_.
RENAMED_FROM_dir 1
RENAMED_FROM_dir 2
RENAMED_FROM_dir 3
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list