I currently do my textfile manipulation through a bunch of badly remembered AWK, sed, Bash and a tiny bit of Perl.
I've seen mentioned a few places that python is good for this kind of thing. How can I use Python to replace shell scripting, AWK, sed and friends?
I will give here my opinion based on experience:
For shell:

shell can very easily spawn read-only code. Write it and when you come back to it, you will never figure out what you did again. It's very easy to accomplish this.
shell can do A LOT of text processing, splitting, etc in one line with pipes.
it is the best glue language when it comes to integrate the call of programs in different programming languages.

For python:

if you want portability to windows included, use python.
python can be better when you must manipulate just more than text, such as collections of numbers. For this, I recommend python.

I usually choose bash for most of the things, but when I have something that must cross windows boundaries, I just use python.
How to implement common bash idioms in Python?