bug-findutils
[Top][All Lists]
Advanced

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

[bug #50259] -printf %h behaves weirdly with trailing slashes


From: Tavian Barnes
Subject: [bug #50259] -printf %h behaves weirdly with trailing slashes
Date: Wed, 8 Feb 2017 20:12:03 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?50259>

                 Summary: -printf %h behaves weirdly with trailing slashes
                 Project: findutils
            Submitted by: tavianator
            Submitted on: Thu 09 Feb 2017 01:12:01 AM UTC
                Category: find
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Tavian Barnes
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.6.0
           Fixed Release: None

    _______________________________________________________

Details:

If the root path has a trailing slash, %h doesn't replace it with '.',
resulting in this strange behaviour:

$ mkdir -p foo/bar
$ find foo -printf '%h/%f\n'
./foo
foo/bar
$ find foo/ -printf '%h/%f\n'
foo/foo/
foo/bar





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50259>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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