3 ms·
> I'm surprised by that. In hindsight, you shouldn't. Shell sorts wildcard expansion lexicographically, so it needs all the filenames read at the sorting time.
by dozzie 11y ago
> I'm surprised by that.
In hindsight, you shouldn't. Shell sorts wildcard expansion lexicographically,
so it needs all the filenames read at the sorting time.
- tzs 11y agoI remain surprised. If the partially read, unsorted set of filenames exceeds ARG_MAX bytes the shell can infer that exec will fail (E2BIG). There is no need to finish reading the names and sorting them.