Sent from ProtonMail, encrypted email based in Switzerland.
Sent with Proton Mail secure email.
On Tuesday, May 19th, 2026 at 5:24 AM, Go Canes <[email protected]>
wrote:
> 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.
> --
I am happy that the following does the job without sorting the dates but it is
fine.
olivares@fedora:~/Downloads$ awk -F',' '{ printf "%-6s %-20s %-20s %-30s %-4s
%-5s %-5s\n", $13, $2, $3, $4, $5, $9, $12 }' Dashboard-20260519.csv | grep 100
> tmp.csv
I can open the tmp.csv file and then look manually. If I have to sort the
dates, I will do it in CALC or google sheets.
Best Regards,
Antonio
--
_______________________________________________
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