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

Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top