I have a large file that contains 2 IPs
per line - and there's about 3 million lines total.
Here's an example of the file:
1.32.0.0,1.32.255.255
5.72.0.0,5.75.255.255
5.180.0.0,5.183.255.255
222.127.228.22,222.127.228.23
222.127.228.24,222.127.228.24
I need to convert each IP
to an IP Decimal
, like this:
18874368,18939903
88604672,88866815
95682560,95944703
3732923414,3732923415
3732923416,3732923416
I'd prefer a way to do this strictly via command line. I'm okay with perl
or python
being used, as long as it doesn't require extra modules to be installed.
I thought I had come across a way that someone converted IPs
like this using sed
but can't seem to find that tutorial anymore. Any help would be appreciated.