with ed you can edit the file in place, no need for another file (other than the temp copy ed will make for itself)
delete line number 10 from file.txt from command line with an inline input document:
ed file.txt <<eof_ed
10d
w
q
eof_ed
or a one-liner:
echo "10d\nw\nq"|ed file.txt
HTH,
p5wizard