in reply to How do I remove control characters?
For similiar problem (removing colors):
For shell:
cat something | perl -le 'while (<>) {chomp; s/[\000-\037]\[(\d|;)+m// +g; print ($_) };'
ANSI colors looks like :) ^[[number[;number]m - reset: ^[[m# sth; sth; { s/[\000-\037]\[(\d|;)+m//g; } # sth else;
|
|---|