You would use
sed. It's a "Stream EDitor."
Here is an example that would cut away the first and last 3 lines of text. If you can't do it, I'll write you the script that will rip the letters you want.
sed -ne '1{n;n;n;N;N;}' -e '$d;N;P;D'
Here's a link to a sed tutorial for you. It has links to other tutorials as well.
http://www.selectorweb.com/sed_tutorial.html
Edit:
One more thing. If the words are all exactly the same, for example, if you had the numbers 1234567 at the beginning and end of every file, you could just run
sed s/"1234567"//g FILENAME
and it would replace "1234567" with whatever is between the slashes. In this case, nothing is between the slashes, so it replaces it with nothing. The same as deleting it.