Skip to content

Instantly share code, notes, and snippets.

@errordeveloper
Created September 9, 2014 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save errordeveloper/e9d57c8d68c213c08f42 to your computer and use it in GitHub Desktop.
Save errordeveloper/e9d57c8d68c213c08f42 to your computer and use it in GitHub Desktop.
This script is invaluably useful in CI systems when we use some test runners which do not have an option to disable colourful output. source: http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed
#!/bin/sed -rf
s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment