Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
grep ansi color log output doesn't work #1463
There seems to be extra terminfo codes that are used on OSX and Debian that don't work with rundeck. For example:
echo "This is a test." | grep --color=always test | less This is a ESC[01;31mESC[KtestESC[mESC[K.
The html log ends up looking like this:
This is a <span class="ansi-mode-bold ansi-fg-red"></span>Ktest<span class="ansi-mode-normal"></span>K.
The ESC[K is defined according to bash hackers as "Clear line from current cursor position to end of line".
This example is running on Debian 8 (jessie). I don't know if this is platform specific due to terminfo, but I doubt it: I get the same grep output results with GNU grep 2.21 on OS X and GNU grep 2.20 on Debian jessie.