What you were supposed to see is that the 10 you refer to is the value for "\n" which will ALWAYS be at the end of an echo.
This therefore makes your test useless as it will NEVER be wrong.
Yes you can do multiline edits in sed but you will need to be careful about how you go about it.
Personally I think you need to step back and rethink what you are trying to do.
Also, as identified on several occasions, you need to test a lot more of what you are trying to do before going ahead.
Currently you are trying to change fields which may or may not actually work/be allowed.
Most of all you need to try and build your script a line at a time by trialling what you want to do on the command line first
and see what the results are. This process would save a lot of the stoppages you have been running into.