aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Brillault <vincent.brillault@cern.ch>2018-01-09 14:12:27 +0100
committerVincent Brillault <vincent.brillault@cern.ch>2018-01-09 15:57:10 +0100
commit5fd85e288bd331020943b0b346a7a6361e59a5dd (patch)
tree38ba0ca18dd4a40df7f0dd81cb885d62a0213a07
parentb6bfcdbd4551257f924a7e84d60c93a063dd5d0a (diff)
downloadspectre-meltdown-checker-5fd85e288bd331020943b0b346a7a6361e59a5dd.tar.lz
spectre-meltdown-checker-5fd85e288bd331020943b0b346a7a6361e59a5dd.tar.xz
spectre-meltdown-checker-5fd85e288bd331020943b0b346a7a6361e59a5dd.zip
No-color: interpret string (-e) to be able to mach \x1B
-rwxr-xr-xspectre-meltdown-checker.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh
index a6cb99f..16cc0ad 100755
--- a/spectre-meltdown-checker.sh
+++ b/spectre-meltdown-checker.sh
@@ -52,7 +52,7 @@ __echo()
msg="$@"
if [ "$opt_no_color" = 1 ] ; then
# 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
# explicitely call /bin/echo to avoid shell builtins that might not take options
/bin/echo $opt -e "$msg"