I researched how to overwrite and save files with the sed command, so here’s a personal memo.
sed -i -e '1d' input.txt
sed -e '1d' input.txt > output.txt
cp output.txt input.txt
Obviously, sed -i is more convenient.
That’s all from the Gemba.