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
  •  | 
  •  

Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top