Actually I would say Perl is more appropriate. I went back to Perl after 4 years for this sort of task, as it has so many features built into the syntax. Plus it can be run as a one liner.
But seriously, I've got some battle scars from the perl days, and hope not to revisit them. Honestly, there's very little I find I can do with perl and not python, and it's just as easy to express (if not quite as concise) and much simpler to maintain.
But, use the tool that works for you!
All good points.
>you can use it directly from the command line as a one liner. You can do all these (except the last one?) in Python
You can use Python from the command line too, but Perl has more features for doing that, like the -n and -p flags. Then again, Python has the fileinput module. Here's an example:
http://jugad2.blogspot.in/2013/05/convert-multiple-text-file...