1 2 3 4 5 6 7 8
#!/bin/sh bat="BAT $(cat /sys/class/power_supply/BAT*/capacity | tr '\n' ' ')" time="$(date '+KW %W %a %Y-%m-%d %H:%M')" echo "| ${bat}| ${time} |"