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