use awk instead instead of bc in battery script

This commit is contained in:
Dustin Kirkland 2009-04-03 16:05:20 -07:00
commit a33181cc9c

View file

@ -65,7 +65,7 @@ for bat in $BATS; do
fi
percent=$(echo "1+100*$rem/$full" | bc)
percent=$( echo "$rem" "$full" | awk '{printf "%.0f", 100*$1/$2}')
state=$(search "$statefile" "charging state: *\(.*\)")
case $state in