Handling color coded standard output
by taylorkh from LinuxQuestions.org on (#5RPNB)
Please pardon me if this is the wrong forum. It seems like a simple, fundamental issue - the type which often confuse me.
I am playing with a security scanner called lynis which produces a very nicely formatted and color coded output when I run it at the command line. I now have a LOT of work to do to harden my computer. That said, I would like to get this output into some sort of editor with which I could print it or mark it up as I fix various issues. I can redirect > or tee the output of a lynis scan to a file. So far, so good.
If I cat the file it displays the color coding in the terminal. However, if I open it in a GUI text editor or Libre Office writer I see some gibberish representing the color coding but no color.
lynis may provide some reporting tools. I will look into that. Stil, when I capture std out with color coding from lynis or any other source I would like to have a way to make use of it. Any suggestions?
TIA,
Ken
I am playing with a security scanner called lynis which produces a very nicely formatted and color coded output when I run it at the command line. I now have a LOT of work to do to harden my computer. That said, I would like to get this output into some sort of editor with which I could print it or mark it up as I fix various issues. I can redirect > or tee the output of a lynis scan to a file. So far, so good.
If I cat the file it displays the color coding in the terminal. However, if I open it in a GUI text editor or Libre Office writer I see some gibberish representing the color coding but no color.
lynis may provide some reporting tools. I will look into that. Stil, when I capture std out with color coding from lynis or any other source I would like to have a way to make use of it. Any suggestions?
TIA,
Ken