Uhm. Oh heck, I'll bite anyway.
The script is a shell script, mostly scaffolding to provide easy extensibility and usage output. The pre filter is two lines of sed. Adding in perl would mean a rather larger footprint, and json/xml parsers add further dependencies of actually quite a bit more than two lines.
We blithely assume that coder time is more valuable than cpu time so tend to throw more and more code at the problem to make the problem vanish (either through solving it or trough obscuring it), then throw as much hardware at the resulting mess to make it look like it runs acceptably fast. That is quite a lot of wastage, oftentimes easily remedied with a bit of stepping back, looking at the thing in its entirety, and thinking for a bit.
Not sure if that's a whine, and I wasn't about to bring it up, but then you did. This script I wrote for my own enjoyment so it's not critical; if it was more trouble I probably wouldn't have written it at all. But time and again, and both within computing and without, you see that being careful at the start of the pipeline, even with seemingly minor details, can easily yield substantial benefits at the end. Computing is full of such complex systems that we tend to automatically compartimentalise in modules and layers and whatnots, then possibly optimise within the divisions we imposed, but easily forget about the complete picture.
The result is a bit myopic and one easily overlooks even simpler and more efficient solutions that might not merely be possible but already exist. That's what I was on about, regarding the blithe "must have json and/or xml!" comments a bit above. Your "two lines of perl" is a bit of a red herring, perhaps because you yourself missed the point. This particular field already has acceptable transfer formats, why not use them?
In a way, that blind preference for what aren't even very good general formats is the same sort of fault we're accusing the met office of, though perhaps less cripling (for us freetards). And then there's the habitually understated cost of using them.