Deleting text from a file

Hi,
In my korn shell script, I want to delete some particular text from a certain file...How can this be done? Is the below right?

ed $NAMES << EOF
echo "" > /dev/null
echo "${x} = " > /dev/null
echo "name = " > /dev/null
echo "adress = " > /dev/null
w
q
EOF

what is the portion that you want to delete from the file?

Always a sample input and sample output posted would be of great help rather than directly giving the solution that you had tried.