Vlad,
You could use some command line utility like *xsv *
(https://github.com/BurntSushi/xsv)
Install it with homebrew in the terminal:
*$ brew install xsv*
and then:
*$ xsv sort
--select="MSGNO,ADRC_COUNTRY,ADRC_REGION,ADRC_POST_CODE1,ADRC_CITY1,ADRC_CITY2,ADRC_STREET,ADRC_HOUSE_NUM1"
--delimiter=";" --output="/path/to/some-sorted.csv" "/path/to/some.csv"*
HTH,
Jean Jourdain
On Wednesday, March 26, 2025 at 4:04:35 PM UTC+1 Bruce Van Allen wrote:
> Another way staying in BBEdit would be to do some neutralizing
> conversions before parsing into columns.
>
> For example, when I need to embed newlines in a file of text records
> whose records are separated by newlines, I replace the internal newlines
> with another character that isn’t already in the records somewhere -
> such as a backslash (‘\’). It looks like your records all start with
> ‘200' and end with two consecutive semi-colons (‘;;’). If so, then you
> could search for newlines NOT surrounded by those.
>
> When I do this I take a step and then save a copy of the file before
> moving to the next cleanup step. Always want to be able to back up a
> step or two if I goof.
>
> [Sorry about the stupid smart quotes my new email client insists on
> converting from straight quotes.]
>
> HTH
>
> ------ Original Message ------
> From "Marshall Clow" <[email protected]>
> To [email protected]
> Date 3/26/2025 7:41:47 AM
> Subject Re: How to filter / sort CSV-files by certain columns?
>
> >On Mar 26, 2025, at 7:25 AM, Vlad Ghitulescu <[email protected]>
> >wrote:
> >>
> >>You’re probably right re BBEdit vs other special tools - even Rich
> >>suggested this in the beginning of our conversation.
> >>
> >>The question is: Which other tool exactly?
> >>
> >>Excel would not import 3 million+ records 😔 and yes, I encountered
> >>the „helpful“ changes and some more too 😶
> >>
> >>The Perl-CSV family of modules sounds like heaven 😉 - unfortunately I
> >>didn’t learn Perl yet 😶
> >
> >I have done stuff with the ’csv’ module in python 3, but nothing this
> >extensive.
> > https://docs.python.org/3/library/csv.html
> >
> >— Marshall
> >
> >
>
>
> Thanks,
>
> - Bruce
>
> _bruce__van_allen__santa_cruz__ca_
>
>
>
--
This is the BBEdit Talk public discussion group. If you have a feature request
or believe that the application isn't working correctly, please email
"[email protected]" rather than posting here. Follow @bbedit on Mastodon:
<https://mastodon.social/@bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/bbedit/8d1058a2-37d1-4262-bfdd-1a12f952c9e2n%40googlegroups.com.