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/