ed

File Read

ed /path/to/input-file
,p
q

File Write

ed /path/to/output-file
a
DATA
.
w
q

Shell

ed
!/bin/sh
q