How can I get the final printed output of a text file that contains control characters?

StackOverflow https://stackoverflow.com/questions/9796794

  •  25-05-2021
  •  | 
  •  

I have the output of a program that uses control characters to animate a progress bar. The output is in a text file. I would like to somehow obtain the final printed output that results from running cat on the text file, and put that result into a new text file. Is there any way to to this?

有帮助吗?

解决方案

It turned out that in my case it was sufficient to delete the beginning of each line up to the last control character on that line, leaving only the final printed output of the line. This is not a general solution, though.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top