From bb2f54a668db3ee71877f056ecda2849b1e63e28 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 12 Sep 2016 04:17:39 -0400 Subject: [PATCH] Fix line 859: /1024/1024: syntax error: operand expected (error token is "/1024/1024") --- cryptest.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cryptest.sh b/cryptest.sh index 6bdcf2a0..703fb75e 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -857,8 +857,8 @@ if [[ (-e "/proc/cpuinfo") && (-e "/proc/meminfo") ]]; then MEM_SIZE=$(cat /proc/meminfo | "$GREP" "MemTotal" | "$AWK" '{print $2}') MEM_SIZE=$(($MEM_SIZE/1024)) elif [[ "$IS_DARWIN" -ne "0" ]]; then - CPU_COUNT=$(sysctl -a 2>/dev/null | "$GREP" 'hw.availcpu' | "$AWK" '{print $3; exit}') - MEM_SIZE=$(sysctl -a 2>/dev/null | "$GREP" 'hw.memsize' | "$AWK" '{print $3; exit;}') + CPU_COUNT=$(sysctl -a 2>&1 | "$GREP" 'hw.availcpu' | "$AWK" '{print $3; exit}') + MEM_SIZE=$(sysctl -a 2>&1 | "$GREP" 'hw.memsize' | "$AWK" '{print $3; exit;}') MEM_SIZE=$(($MEM_SIZE/1024/1024)) elif [[ "$IS_SOLARIS" -ne "0" ]]; then CPU_COUNT=$(psrinfo 2>/dev/null | wc -l | "$AWK" '{print $1}') @@ -875,7 +875,7 @@ elif [[ (-e "/proc/cpuinfo") ]]; then if [[ -z "$CPU_FREQ" ]]; then CPU_FREQ=512; fi CPU_FREQ=$("$AWK" "BEGIN {print $CPU_FREQ/1024}") elif [[ "$IS_DARWIN" -ne "0" ]]; then - CPU_FREQ=$(sysctl -a 2>/dev/null | "$GREP" 'hw.cpufrequency' | "$AWK" '{print $3; exit;}') + CPU_FREQ=$(sysctl -a 2>&1 | "$GREP" 'hw.cpufrequency' | "$AWK" '{print $3; exit;}') CPU_FREQ=$("$AWK" "BEGIN {print $CPU_FREQ/1024/1024/1024}") elif [[ "$IS_SOLARIS" -ne "0" ]]; then CPU_FREQ=$(psrinfo -v 2>/dev/null | "$GREP" 'MHz' | "$AWK" '{print $6; exit;}')