On Tue, May 19, 2026 at 5:35 AM olivares33561 via users
<[email protected]> wrote:
> [extract fields from a CSV file and then sort on a date field]
> Unfortunately dates are in the form MM/DD/YEAR like 5/19/2026 and it 
> apparently does not work :(

I think this requires more than a simple command-line filter pipeline.
You need to:
1) extract the fields of interest
2) extract the components from the date field
3) re-write the date field components in a sortable order - as Tim
suggested, ISO is best (YYYY-MM-DD).
4) Sort as desired
5) Do the rest of your desired output processing (header, other sorting, etc.)

In other words, you need to write a program.

I'm sure you could do this with awk, but it will be an awk *program*,
not a "1-liner".  FWIW, I would write this in python where there are
modules to handle processing the CSV file, converting the date, etc.
I'm sure others would recommend using perl, etc.
-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to