Perl aside, I would say that's almost imperative to learn sed and awk. They invaluable tools for getting things done in *nix. They seem cryptic at first, but put a weekend into learning them and you learn that they are simply concise.
I'm not a huge fan of perl but I've been writing my one-liners in it for a few years now and I've had less problems with portability.
To put it another way, you've replaced sed incompatibility with python incompatibility. It's not really a win.
I'm not saying Perl is the best choice here, but it's a better choice than Python for cross platform compatibility.
https://www.gnu.org/software/gawk/manual/gawk.html#Getting-S...
http://www.grymoire.com/Unix/Awk.html http://www.grymoire.com/Unix/Sed.html