Delete ANSI codes while saving script output

Some programs make beautiful progress bars and more using ANSI escape sequences. It's good.

What is not nice is that if I put this type of output in a file and then try to look at it, it will fill with strange escape sequences.

Is there a way to disable all ANSI codes during registration?

I usually write the output of a script as follows:

./script >> /tmp/output.log
+5
source share
1 answer

Try:

$ TERM=dumb ./script >> /tmp/output.log

, , ANSI script, . , , , , libncurses , , TERM, .

+7

All Articles