diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-10-13 06:30:48 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-10-13 06:30:48 -0400 |
commit | ed09452c091ae8bd2b31bd03a8bab62d254eb4bf (patch) | |
tree | 3a0786158694cae1af1cc8805c018e0d22965058 | |
parent | af1ec58d3740b1bd5d396e02747a6c18d9231269 (diff) | |
download | cryptopp-git-ed09452c091ae8bd2b31bd03a8bab62d254eb4bf.tar.gz |
Use int cast in awk expression on OS X
-rwxr-xr-x | TestScripts/cryptest.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh index 5c1e9116..a4ecfb7e 100755 --- a/TestScripts/cryptest.sh +++ b/TestScripts/cryptest.sh @@ -950,10 +950,10 @@ elif [[ (-e "/proc/cpuinfo") ]]; then CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print $0/1024}')" elif [[ "$IS_DARWIN" -ne 0 ]]; then CPU_FREQ="$(sysctl -a 2>&1 | $GREP "hw.cpufrequency" | $AWK '{print int($3); exit;}')" - CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print $0/1024/1024/1024}')" + CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print int($0/1024/1024/1024)}')" if [[ (-z "$CPU_FREQ") || ("$CPU_FREQ" -eq 0) ]]; then CPU_FREQ="$(sysctl -a 2>&1 | $GREP "hw.cpufrequency" | $AWK '{print int($2); exit;}')" - CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print $0/1024/1024/1024}')" + CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print int($0/1024/1024/1024)}')" fi elif [[ "$IS_SOLARIS" -ne 0 ]]; then CPU_FREQ="$(psrinfo -v 2>/dev/null | $GREP "MHz" | $AWK '{print $6; exit;}')" |