sed - a Stream EDitor
sed is a UNIX utility which processes a text file one line at a time. It has RegularExpression based string manipulation, a hold buffer, and some basic flow control. Amazing things can be done with these BearSkinsAndStoneKnives. See http://sed.sourceforge.net/ for links to tutorials and sample scripts.