From a5ebf51ebfddba78e2bab91aeca7e7c35b35fa90 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Sat, 7 Oct 2023 15:00:58 +0200 Subject: [PATCH] aaaaaa --- powersave.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/powersave.sh b/powersave.sh index 16cbc41..c3be6d4 100644 --- a/powersave.sh +++ b/powersave.sh @@ -4,7 +4,7 @@ GOVERNOR="powersave" apply_lm=true while getopts 'hopPg:' opt; do - case opt in + case $opt in 'h') echo "Usage: powersave [-hopP] [-g governor]" echo " -h this message" @@ -30,8 +30,8 @@ while getopts 'hopPg:' opt; do GOVERNOR=$OPTARG apply_lm=false ;; + '?'|*) ;; esac - '' done shift $((OPTIND-1)) @@ -40,6 +40,7 @@ CPUS="$(nproc)" for c in $(seq 0 $((CPUS-1))) do echo $GOVERNOR > /sys/devices/system/cpu/"cpu$c"/cpufreq/scaling_governor + printf '[cpu %d] %s\n' "$c" "$(cat "/sys/devices/system/cpu/cpu$c/cpufreq/scaling_governor")" done