by codezero · 10y ago · 0 comments
For example:
ls -la * .txt
OK
ls * .txt -la
Not OK
This drives me mad.
After a glob, of say, * .txt, and let's say there are a.txt, b.txt and c.txt, if I call
ls * .txt -ltra
it expands to ls a.txt b.txt c.txt -ltra
In POSIX it expects options to appear before files, see: https://en.wikipedia.org/wiki/Getopt#Example_1_.28using_POSI...
Trust me, I wish this were not adhered to, but it is.