diff options
Diffstat (limited to 'scripts/uncolor')
| -rwxr-xr-x | scripts/uncolor | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/uncolor b/scripts/uncolor new file mode 100755 index 0000000..81fa743 --- /dev/null +++ b/scripts/uncolor | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Removes ANSI color codes from its stdin, prints to stdout. | ||
| 4 | # Source: https://stackoverflow.com/questions/17998978/removing-colors-from-output | ||
| 5 | |||
| 6 | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | ||
