From ed316bb564dc88fd3d7c537afbb58fa6265b65c2 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sun, 17 Mar 2024 15:33:17 +0100 Subject: [PATCH] Update regex --- cbattery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cbattery b/cbattery index 5ea70c3..1300a97 100755 --- a/cbattery +++ b/cbattery @@ -38,7 +38,7 @@ function disable_charging() { } function get_smc_charging_hex() { - smc -k CH0B -r | awk '{print $4}' | sed 's:\)::' + smc -k CH0B -r | awk '{print $4}' | sed s:\):: } function get_smc_charging_status() { @@ -51,7 +51,7 @@ function get_smc_charging_status() { } function get_battery_percentage() { - battery_percentage=$(pmset -g batt | tail -n1 | awk '{print $3}' | sed 's:%\;::') + battery_percentage=$(pmset -g batt | tail -n1 | awk '{print $3}' | sed s:%\;::) echo "$battery_percentage" }