Remove control chars from log

This commit is contained in:
Lup Yuen Lee 2024-11-30 08:48:03 +08:00
parent 18a2e8ce28
commit b8c12f9d04
3 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,7 @@ function test_once() {
| sed 's/\x1B[<=>]//g' \
| sed 's/\x1B\[[0-9:;<=>?]*[!]*[A-Za-z]//g' \
| sed 's/\x1B[@A-Z\\\]^_]\|\x1B\[[0-9:;<=>?]*[-!"#$%&'"'"'()*+,.\/]*[][\\@A-Z^_`a-z{|}~]//g' \
| cat -v \
>/tmp/special-qemu-riscv-knsh-clean.log
cat /tmp/special-qemu-riscv-knsh-clean.log | \
gh gist create \

View file

@ -14,6 +14,7 @@ function test_once() {
| sed 's/\x1B[<=>]//g' \
| sed 's/\x1B\[[0-9:;<=>?]*[!]*[A-Za-z]//g' \
| sed 's/\x1B[@A-Z\\\]^_]\|\x1B\[[0-9:;<=>?]*[-!"#$%&'"'"'()*+,.\/]*[][\\@A-Z^_`a-z{|}~]//g' \
| cat -v \
>/tmp/special-qemu-riscv-knsh64-clean.log
cat /tmp/special-qemu-riscv-knsh64-clean.log | \
gh gist create \

View file

@ -11,6 +11,7 @@ function runme() {
| sed 's/\x1B[<=>]//g' \
| sed 's/\x1B\[[0-9:;<=>?]*[!]*[A-Za-z]//g' \
| sed 's/\x1B[@A-Z\\\]^_]\|\x1B\[[0-9:;<=>?]*[-!"#$%&'"'"'()*+,.\/]*[][\\@A-Z^_`a-z{|}~]//g' \
| cat -v \
>/tmp/special-qemu-riscv-nsh64-clean.log
cat /tmp/special-qemu-riscv-nsh64-clean.log | \
gh gist create \