Skip to content

Instantly share code, notes, and snippets.

@jflopezfernandez
Created August 25, 2023 20:55
Show Gist options
  • Save jflopezfernandez/c993599cec8355ef148c9018ac3e7608 to your computer and use it in GitHub Desktop.
Save jflopezfernandez/c993599cec8355ef148c9018ac3e7608 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
#
# Remove color control sequences from terminal output.
sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment