URL:
<http://savannah.gnu.org/bugs/?28872>
Summary: Mistake in "10.2.1 Problems with -exec and
filenames"
Project: findutils
Submitted by: None
Submitted on: Fr 12 Feb 2010 10:12:48 UTC
Category: documentation
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: Martin v. Wittich
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Release: None
Fixed Release: None
_______________________________________________________
Details:
# safer
find -exec sh -c 'something "$@"' {} \;
find -execdir sh -c 'something "$@"' {}\;
should probably be
# safer
find -exec sh -c 'something "$@"' sh {} \;
find -execdir sh -c 'something "$@"' sh {} \;
as sh uses it's first argument as $0:
$ sh -c 'echo "$@"' one two three
two three
$ sh -c 'echo "$0" "$@"' one two three
one two three
$ sh -c 'echo "$@"' sh one two three
one two three
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28872>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/