add support for ',' decimal seperator

This commit is contained in:
Rene
2024-03-20 09:05:50 +01:00
parent f50bad8f3c
commit fa2028d2e3

View File

@@ -229,7 +229,7 @@ function get_maintain_percentage() {
}
function get_voltage() {
voltage=$(ioreg -l -n AppleSmartBattery -r | grep "\"Voltage\" =" | awk '{ print $3/1000 }')
voltage=$(ioreg -l -n AppleSmartBattery -r | grep "\"Voltage\" =" | awk '{ print $3/1000 }' | tr ',' '.')
echo "$voltage"
}