diff --git a/inxi b/inxi index 052ce9c..abd9a5d 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.3.13 +#### version: 0.3.14 #### Date: November 3 2008 ######################################################################## #### inxi is a fork of infobash, the original bash sys info script by locsmif @@ -1287,7 +1287,12 @@ calculate_multicore_data() string_data=" $( awk '{print $2}' <<< $1 )" # add a space for output string_number=$( awk '{print $1}' <<< $1 ) fi - string_number=$( echo $string_number $2 | awk '{total = $1*$2; print total}' ) + # handle weird error cases where it's not a number + if [ -n "$( egrep '^[0-9\.,]+$' <<< $string_number )" ];then + string_number=$( echo $string_number $2 | awk '{total = $1*$2; print total}' ) + else + string_number="Error: string_number=$string_number " + fi echo "$string_number$string_data" }