- #!/bin/sh
- INFO=$(grep -e "STATUS\|HEALTH\|CAPACITY" /sys/class/power_supply/battery/uevent | awk -F= '{print $2}')
- STATUS=$(echo $INFO | awk '{print $1}')
- HEALTH=$(echo $INFO | awk '{print $2}')
- CAPACITY=$(echo $INFO | awk '{print $3}')
- echo "Status: $STATUS"
- echo "Health: $HEALTH"
- echo "Capacity: $CAPACITY"
Recent Pastes