mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2025-01-05 19:08:41 +01:00
No-color: interpret string (-e) to be able to mach \x1B
This commit is contained in:
parent
b6bfcdbd45
commit
5fd85e288b
@ -52,7 +52,7 @@ __echo()
|
|||||||
msg="$@"
|
msg="$@"
|
||||||
if [ "$opt_no_color" = 1 ] ; then
|
if [ "$opt_no_color" = 1 ] ; then
|
||||||
# strip ANSI color codes
|
# strip ANSI color codes
|
||||||
msg=$(echo "$msg" | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g")
|
msg=$(/bin/echo -e "$msg" | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g")
|
||||||
fi
|
fi
|
||||||
# explicitely call /bin/echo to avoid shell builtins that might not take options
|
# explicitely call /bin/echo to avoid shell builtins that might not take options
|
||||||
/bin/echo $opt -e "$msg"
|
/bin/echo $opt -e "$msg"
|
||||||
|
Loading…
Reference in New Issue
Block a user