-2

im using a tool suite and i would like to copy the results to a text file in a readable format how ever the tool suite uses color and when i copy the results it copys the special character codes as well how do i make it where it does not copy the color as well or when the results of the CLI output is regular text

what im using to copy results to the text file is

$ToolSuite --parameters > results.txt

is there a special format or commands that i can type or enter that would just copy text with no format

jww
  • 97,681
  • 90
  • 411
  • 885
  • Possible duplicate of [Remove ANSI color codes from a text file using bash](https://stackoverflow.com/questions/19296667/remove-ansi-color-codes-from-a-text-file-using-bash) – KamilCuk Feb 06 '19 at 01:15
  • the link did help when i searched this never popped up so thank you very much – ryan harmon Feb 06 '19 at 01:22

1 Answers1

1

I use this filter to filter out colors:

... | sed  $'s/\e\\[[^m]*m//g'

and a general escape killer:

... | sed $'s/\e\\[[0-9;:]*[a-zA-Z]//g'
Wiimm
  • 2,971
  • 1
  • 15
  • 25