I was running a program, and it will output the progress bar to a file train.2.log
. Here's a link to the file train.2.log, which looks like the following on terminal :
This is line 1
Training ...
This is line 2
epoch iteration main/loss main/loss_ctc main/loss_att ...
This is line 3
0 100 455.209 899.082 264.978 ...
There are no problems when u were to call head -n3 train.2.log
, it shows the first 3 lines very well, but in the text file its not human-readable, because of the binaries <0x1b>
that are written within it (see train.2.log).
Question : How do i modify the file such that it becomes human readable ?
Usually progress bars are written such that \r
is used instead of \n
, following this question.
Hence i tried this solution, which did not work as the program that i called doesn't seem to be using \r
.