On Thu, May 16, 2024, at 11:36 PM, Robert Elz wrote: > Date: Thu, 16 May 2024 11:36:50 -0400 > From: Chet Ramey <chet.ra...@case.edu> > Message-ID: <613852f3-c9ef-43d8-821b-37be3d9e9...@case.edu> > > | I have high hopes for `GLOBSORT', though. > > That is at least a plausible name - never heard of it, and my bash man > page (still at 5.2, I have a 5.3-a1 binary, but haven't installed its > man page anywhere) doesn't mention it. What does it do?
This is the description from the bash.1 that's currently in my local repository: GLOBSORT Control how the results of pathname expansion are sorted. The value of this variable specifies the sort criteria and sort order for the results of pathname expansion. If this variable is unset or set to the null string, pathname expansion uses the historical behavior of sorting by name. If set, a valid value begins with an optional `+', which is ignored, or `-', which reverses the sort order from ascending to descending, followed by a sort specifier. The valid sort specifiers are `name', `size', `mtime', `atime', `ctime', and `blocks', which sort the files on name, file size, modification time, access time, inode change time, and number of blocks, respectively. For example, a value of `-mtime' sorts the results in descending order by modification time (newest first). A sort specifier of `nosort' disables sorting completely; the results are returned in the order they are read from the file system. If the sort specifier is missing, it defaults to `name', so a value of `+' is equivalent to the null string, and a value of `-' sorts by name in descending order. Any invalid value restores the historical sorting behavior. -- vq