Introducing shell script for subnets aggregation

then it is me definitely :slight_smile:

And if you add the ^ anchor in the beginning (^ means start of the line), you'll see that nothing is highlighted anymore.

yes, because that's a totally different regexp.

Actually I said a silly thing in my previous comment and I have to correct myself. It would match in reality without the anchor. But then that's why anchors are a must, and I always use them.

Optimized some more and partially re-written, 2x speed improvement (and yet more improvement with higher number of subnets). Probably this is as fast as I can make it in shell code.

Just wanted to put an update here. I have re-written fairly big parts of the scripts to improve the performance on slow CPUs and to streamline the code. That lead to another 30-40% gain in performance. I also added a script which detects and aggregates local area networks (which was my ultimate goal for this side project) and another one which does the same but as a stand-alone version which doesn't depend on other scripts. Need help testing it. If someone's interested to help, please post in this thread:

Testers wanted for a shell script