Update 00_lowpower.sh

Sync Ver.200626
This commit is contained in:
hi80482 2020-07-03 16:39:50 +08:00 committed by GitHub
parent 53acfc0001
commit 15575bc6b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
#!/bin/bash
BAT_PNT=`upower -i $(upower -e | grep 'battery') | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' | cut -d % -f1 `
BAT_PNT=$(upower -i "$(upower -e | grep 'battery')" | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' | cut -d % -f1 )
if [ "$BAT_PNT" -lt "20" ]; then
@ -11,5 +11,5 @@ if [ "$BAT_PNT" -lt "20" ]; then
fi
else
echo $BAT_PNT
echo "$BAT_PNT"
fi