you can use vi
vi is not too complicated to run, but you need to learn the commands first.
before attempting to edit a file back it up like this
Code:
cp filename filename.bak
then you can restore it to the original if something gets whacked.
basically vi has several modes. when you open a file like this
vi will be in command mode. press the i key to enter insert mode and edit your file, you can move the cursor with the arrow keys.
hit escape to get back to command mode
this command will save and exit the file
from command mode you can delete, letters, words and lines easily by positioning the cursor and use this
Code:
dl = delete letter
dw = delete word
dd = delete line
also something like this
will delete 10 lines
http://www.eng.hawaii.edu/Tutor/vi.html