URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=15235>
Summary: Leading directories are misparsed as expressions
Project: findutils
Submitted by: ericb
Submitted on: Sat 12/17/05 at 21:59
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: Eric Blake
Originator Email:
Open/Closed: Open
Release: 4.2.27
Fixed Release: None
_______________________________________________________
Details:
Per POSIX, http://www.opengroup.org/onlinepubs/009695399/utilities/find.html,
"The first argument that starts with a '-', or is a '!' or a '(', and all
subsequent arguments shall be interpreted as an expression made up of the
following primaries and operators."
Therefore, the following invocations must treat their argument as a directory
name, rather than an expression (or portion thereof).
$ mkdir \(1 \!2 \)
$ touch \(1/a \!2/b \)/c
Buggy behavior:
$ find \)
find: invalid expression: you have too many ')'
$ find \!1
find: invalid predicate `!1'
$ find \(2
find: invalid predicate `(2'
Expected behavior:
$ find \(1 \!2 \)
(1
(1/a
!2
!2/b
)
)/c
As a side note, the errors are inconsistent in their use of '' vs. `'
quoting.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=15235>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils