ed

ed#

The original Unix line editor.

$ ed file
$ printf '%s\n' '1,$s/old/new/g' w | ed file