I'm trying to post-process the output of script
into a more readable form, similar to Removing control chars (including console codes / colours) from script output, but I've noticed that col
doesn't always work.
For instance,
$ cat -v uncolored
foo^H^H^Hbfoo^H^H^Hafoo^H^H^Hr^M
$ col -bp < uncolored
baroo
Why doesn't col -bp
output just bar
? Where are the extra two o
s coming from?
^M
or^?
? – DopeGhoti Jun 11 '18 at 22:40^H
. – Jeffrey Jun 11 '18 at 23:49