> > On Fri, Jun 8, 2018 at 5:15 PM, ToddAndMargo <toddandma...@zoho.com> > wrote: >> >> How do I fix this? >> >> $ ls | perl6 -e 'my @x=slurp(); say @x.sort' >> (log.06-08-2018_16:07:39.zip >> log.06-08-2018_17:07:39.zip >> log.07-08-2018_06:07:39.zip >> log.07-08-2018_16:07:39.zip >> log.12-08-2016_06:07:39.zip >> ) >> >> >> 2016 should be at the top. >> > On Fri, Jun 8, 2018 at 9:23 PM, Brent Laabs <bsla...@gmail.com> wrote:
> Rename all of the input files using ISO 8601 dates. I can't tell, from > looking at those numbers, if the first field is the month or the day, so > it's impossible to sort data like that with certainty. > You certainly *can* sort it the way they are, parse out the fields, order them, and sort by the right parts, but Brent has the best answer.. For more information on ISO 8601, see https://xkcd.com/1179/