Consider dates in the ISO 8601 format i.e.
2015-01-28, and say we have a folder with files of the form:
I am looking for a glob pattern in zsh (or Bash) that I could use to specify files between two dates.
For example, say I want to copy files between
2015-02-03. Is there an easy way to build a glob expression to refer to files between those two dates (including them)?
The following may help (from lexicographical order):
An important exploitation of lexicographical ordering is expressed in the ISO 8601 date formatting scheme, which expresses a date as YYYY-MM-DD. This date ordering lends itself to straightforward computerized sorting of dates such that the sorting algorithm does not need to treat the numeric parts of the date string any differently from a string of non-numeric characters, and the dates will be sorted into chronological order.