You should use ed. It is the standard.
Not a member of The Register? Create a new account here.
Remember me on this computer? Post anonymously?