SED

SED or Stream EDitor allows u to transform it's input (a file or stream) into a new stream (see SED) also look at AWK a very similar language that offers an alternate way to do it.