[Trisquel-users] Re : Re-order groups of identical strings separated by blank lines so that the most frequently repeated strings are at the top

lcerf at dcc.ufmg.br lcerf at dcc.ufmg.br
Wed Jul 24 23:15:59 CEST 2019


Alas, there are IPv6 fields in the data; when I asked LibreOffice Calc to  
treat the colon (:) as a field separator,
chaos ensued. That succinct script might do the same ...

Certainly.  If it is always the first ":" (on the line) that must be  
substituted, then a simple solution is:
$ cut -d : -f 1 > tmp1
$ cut -d : -f 2- > tmp2
$ paste tmp1 tmp2
If there can be IPv6 addresses before or after the ":" to substitute then a  
regular expression and sed or awk should probably do the job.

It's 10.3 MB, so you'll have to grow your own ...

Well, I will not do that.


More information about the Trisquel-users mailing list