URL:
<http://savannah.gnu.org/bugs/?31943>
Summary: Optional path component violates POSIX
Project: findutils
Submitted by: None
Submitted on: Tue Dec 21 16:18:36 2010
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: Chris Rees
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Release: None
Fixed Release: None
_______________________________________________________
Details:
Most operating systems (FreeBSD [1], Solaris [2]) implement the correct
behaviour when not give a path to search.
Example:
$ find -type d
should fail.
Find should _require_ the first non-option to be a path, whereas this variant
assumes '.' if not provided.
This means that people writing scripts often don't make them portable; for
example the busybox project had some in their Makefiles until recently [3]
Perhaps now the damage is done, a warning could be given if this incorrect
behaviour is relied upon?
I'll write a patch shortly if that sounds agreeable.
[1] http://nixdoc.net/man-pages/FreeBSD/find.1.html
[2] http://docs.sun.com/app/docs/doc/816-0210/6m6nb7m9j?l=en&a=view
[3]
http://git.busybox.net/busybox/commit/?id=12caabfa2da59ef877ad7ccbe949164dcc6d69e4
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31943>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/