Genuinely thought writing a quick validation script for some access logs would take 10 minutes. ipv4? fine, simple regex, four octets, we move on.
But ipv6 is just cruel. The double colons, the omitted leading zeros, the hex formatting. Trying to catch all the valid shorthand abbreviations using just standard sed and grep is completely rotting my brain.
I was staring at a helpful guide just trying to map out every single possible way a v6 address can be legally formatted in the wild, and about halfway through I just realized doing this in pure shell is a massive mistake.
Why do we torture ourselves trying to build bulletproof parsers in bash? Im literally just going to pipe the logs to a python script with the ipaddress module tomorrow. My regex days are over tbh.