3 ms·
Right but ls calls getopt – and determines the meaning of the values provided. After a glob, of say, * .txt, and let's say there are a.txt, b.txt and c.txt, if
by codezero 11y ago
Right but ls calls getopt – and determines the meaning of the values provided.
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_POSIX_standard_getopt.29 https://en.wikipedia.org/wiki/Getopt#Example_1_.28using_POSI...
Trust me, I wish this were not adhered to, but it is.