AWK

AWK is an awesome stream editing language it allows you to do truly mad stuff with files or streams of text (see AWK), also look up SED which is another Stream EDitor (see SED)