How can I trim these 7 columns down to 5 columns, by running some script of sorts.
I recall you can do this using regex / php but buggered if I can recall how we did it.
Example code ( of a GEO IP db ( 115,000 lines )
"3231296768","3231297023","ripencc","702518400","EU","EU","European Union"
"3231297024","3231297279","ripencc","441763200","EU","EU","European Union"
"3231297280","3231297535","ripencc","702518400","EU","EU","European Union"
"3231297536","3231297791","ripencc","702518400","EU","EU","European Union"
"3231297792","3231298047","ripencc","702518400","EU","EU","European Union"
"3231298048","3231298303","ripencc","702518400","EU","EU","European Union"
"3231298304","3231298559","ripencc","702518400","EU","EU","European Union"
I need to remove columns 3 and 4 from every line.
Any help appreciated.
While jimw’s answer is the best answer in general, if you want a pure PHP solution I would suggest the following: