sed - How to remove the decorate colors characters in bash output? -


a console program (translate-shell) has output colors , uses special decorate characters this: ^[[22m, ^[[24m, ^[[1m... , on.

i'd remove them plain text.

i tried tr -d "^[[22m" , sed 's/[\^[[22m]//g', removed number, not special character ^[

thanks.

you have multiple options:

edit

this command job pretty well:

sed -r "s/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|k]//g" 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -