diff options
Diffstat (limited to 'power_now')
-rwxr-xr-x | power_now | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -26,9 +26,9 @@ case "$BATTERY" in fi elif [ -f "${DIRNAME}/current_now" ]; then if [ -n "${MILLIWATTS}" ]; then - POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | awk '{print $1*$2/1e9}' | head -1)" + POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | paste -d' ' -s | awk '{print $1*$2/1e9}' | head -1)" else - POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | awk '{print $1*$2/1e12}' | head -1)" + POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | paste -d' ' -s | awk '{print $1*$2/1e12}' | head -1)" fi fi if [ -n "${TOTAL}" ]; then @@ -68,9 +68,9 @@ case "$BATTERY" in fi elif [ -f "${DIRNAME}/current_now" ]; then if [ -n "${MILLIWATTS}" ]; then - POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | awk '{print $1*$2/1e9}' | head -1)" + POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | paste -d' ' -s | awk '{print $1*$2/1e9}' | head -1)" else - POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | awk '{print $1*$2/1e12}' | head -1)" + POWER="$(cat "${DIRNAME}/current_now" "${DIRNAME}/voltage_now" | paste -d' ' -s | awk '{print $1*$2/1e12}' | head -1)" fi fi if [ -z "${QUIET}" ]; then |