I want any stdout to display on one line only. Each successive line should overwrite the last.
Typically, I would do
echo -ne "Overwrite me. \033[0K\r"
But now I want to pipe the output, and since echo is not a filter I need to use sed or something e.g.
cat story.txt | some.sed.like.util.for.replacing.$.with.\033[0K\r