I want to add an escape (tty control) at the end of each line.
sed '/s/$/foo/g'
appends foo
to the end of the line.
I want to append esc[K
to the end of line (erase to end of line)
I've tried
sed 's/$/\033[K/g'
sed 's/$/\\033[K/g'
sed 's/$/\e[K/g'
sed 's/$/\\e[K/g'
Neither produces an escape-character, just prints what I enter.
How can I get an escape-character in sed?
bash
or some other shell?