ex

ex#

Line-mode vi (POSIX editor).

$ ex file
$ ex -s -c '%s/old/new/g|x' file