bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #28872] Mistake in "10.2.1 Problems with -exec and filenames"


From: anonymous
Subject: [bug #28872] Mistake in "10.2.1 Problems with -exec and filenames"
Date: Fri, 12 Feb 2010 10:12:49 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.15) Gecko/2009102704 Fedora/3.0.15-1.fc10 Firefox/3.0.15

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: address@hidden
             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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]