Added stripansi.sh, for sending 'cabal test' output to file.
cabal test | ./stripansi.sh > test.log.
This commit is contained in:
parent
91cc03b131
commit
9548f06699
1 changed files with 10 additions and 0 deletions
10
stripansi.sh
Executable file
10
stripansi.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# use th is to strip out ANSI codes, if you want to pipe
|
||||||
|
# outputof 'cabal test' to a file.
|
||||||
|
|
||||||
|
if which -s gsed; then
|
||||||
|
gsed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
|
||||||
|
else
|
||||||
|
gsed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue