rainbowstream
rainbowstream copied to clipboard
How to disable color output
I need to disable color output so I can pipe it to another process, or to a Teletype (!). How can I do that? Marc
Answering my own question, invoking rainbowstream like this is a workaround, stripping color codes with a pipe to sed:
rainbowstream | sed 's/\x1b[[0-9;]*m//g'
Marc
Well, that worked with Ubuntu, but somehow not on Debian. To make the same thing kind of work on Debian, I had to do:
stdbuf -oL rainbowstream | sed 's/\x1b[[0-9;]*m//g'
or the output of rainbowstream would be caught in the stdout buffer. The only issue with this one is that it does not print the prompts. Otherwise it works fine on keyboard input.