Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3260

Docs, HowTos, Tips & Tricks • [Tips] How to remove control characters from terminal recording (i.e. with script command)

$
0
0
Hello,

Just a tip on now to remove control characters from terminal logs (i.e. generated with the script [1] command).

The ansi2txt program is required (from the colorized-logs package [2]).

You can use the following command [3] where log.txt is the log generated by the script command (or similar commands):

Code:

cat log.txt | ansi2txt | col -b > log-cleared.txt
Hope this helps.

--
[1] SCRIPT(1)
[2] colorized-logs
[3] Removing control chars (including console codes / colours) from script output

Statistics: Posted by Aki — 2024-05-03 02:57 — Replies 0 — Views 22



Viewing all articles
Browse latest Browse all 3260

Trending Articles