Date: Thu, 12 Apr 2018 11:39:11 +0100 From: Geoff Clare <g...@opengroup.org> Message-ID: <20180412103911.GA6656@lt2.masqnet>
| Huh? The '-' is quoted by the double quotes and should therefore be | treated literally. The problem is that there is nothing in either TC2 or TC2 + 985-fix that says that should happen. And without that "should" is really just wishing (based upon what shells actually do, or most of them). The issue is how to specify it so that everything works correctly, for all the cases of sh pattern matching, and for the other users of fnmatch() Ideally: find dir -name 'pattern' -print should list the same filenames (in a different order/format) as ls dir/pattern lists, for all possible patterns (temporarily ignoring leading dot issues, if there are any), and ls dir | while read f do case "$f" in (pattern) printf '%s\n' "$f";; esac; done should (again, ignoring '.' issues for now) print the same list. kre