URL: <https://savannah.gnu.org/bugs/?58170>
Summary: find . -name "ba*.tmp" fails if more than 1 match (windows 10) Project: findutils Submitted by: jimcant Submitted on: Mon 13 Apr 2020 04:17:41 PM UTC Category: find Severity: 3 - Normal Item Group: Wrong result Status: None Privacy: Public Assigned to: None Originator Name: Jim Cant Originator Email: Open/Closed: Open Release: 4.2.20 Discussion Lock: Any Fixed Release: None _______________________________________________________ Details: This is on Windows 10. If the file pattern matches more than one file, the search fails with a 'paths must precede expression' message. Happens if patter is not quoted, single quote, or double quoted. (It is as if the pattern is getting expanded as on Unix when not quoted.) Here's is screen shot of several commands that illustrate the issue: when trying various matchs with wildcards against 3 files, the only ones that work are when a pattern matches only one file. T:\>ls b*.tmp bag.tmp bat.tmp bug.tmp T:\>find . -name "bu*.tmp" ./bug.tmp T:\>find . -name "ba*.tmp" find: paths must precede expression Usage: find [-H] [-L] [-P] [path...] [expression] T:\>find . -name "bag*.tmp" ./bag.tmp T:\>find . -name bag*.tmp -o -name bat*.tmp ./bag.tmp ./bat.tmp T:\>find . -name bag*.tmp bat*.tmp find: paths must precede expression Usage: find [-H] [-L] [-P] [path...] [expression] _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?58170> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/