Check your ed script. I'll bet there is at least one space at the beginning of most of the lines, which happens when one copy/pastes from a web browser.
The ed() commands should be at the beginning of the line. The solo '.' that indicates the end of new data
must be the
only character on its line.
Oh, perhaps we are incorrectly assuming you are using UNIX/Linux for this. If using Winders, your editor might be putting other characters in the ed script, like a <CR> at the end of each line. To see invisible characters that might be screwing up the ed script, try:
You should see exactly the characters you entered, '\n' for the new lines and blanks for spaces. If you see any '\r's, this might explain your trouble.