Classic UNIX line editor for basic text file editing
Classic UNIX line editor
ed
$ ed myfile.txt
$ echo -e 'a\nHello World\n.\nw' | ed myfile.txt
$ echo -e '1,$s/old/new/g\nw' | ed myfile.txt