KoblentsBlog Photography
Contact About
Published Mar 2, 2020
Recently I needed to sort a file of entries by the date in each entry, where the date was a human-readable string across a few whitespace breaks. The format of each line was like this:
1
ENTRY-0009      FAIL    Thu Sep  5 17:39:24 2019        PASS 7  FAIL 6
But the most obvious sort command
sort entries.txt -k7 -k4M -k5 -k6
didn't produce results sorted in the expected order (2019, Sep [month], 5, 17:39:24). Let me show you after the break:
 
 
« Newest July 2019 »
© Copyright Koblents.com, 2012-2024