11 lines
209 B
Bash
11 lines
209 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
FILENAME=$(date -I)
|
||
|
|
||
|
while true; do
|
||
|
TIMESTAMP=$(date +%s)
|
||
|
STATS=$(acpi | sed "s/.*\([0-9]\{2\}\)%.*/\1/")
|
||
|
echo "$TIMESTAMP,$STATS" >> ~/.scripts/battery_$FILENAME.log
|
||
|
sleep 1
|
||
|
done
|