I have a text file containing 100s of comma separated IPs with just spaces between them.
I need to take them 10 at a time and put them in another block of code. So, for IPs:
1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, ... 123.123.123.123, 124.124.124.124, 125.125.125.125
I would need:
codethings [1.1.1.1, 2.2.2.2, ... 10.10.10.10] code code code
codethings [11.11.11.11, 12.12.12.12, ... 20.20.20.20] code code code
codethings [21.21.21.21, 22.22.22.22, ... 30.30.30.30] code code code
etc
I'm pretty sure I could do it with RegEx but I can't help but think there are simpler ways to do it.
Any and all help appreciated. Thank you!