Giovanni Scafora schrieb:
modprobe $mod || grep "$governor"
/sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors >
/dev/null 2>&1

or

grep "$governor"
/sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors ||
modprobe $mod > /dev/null 2>&1

The second one doesn't make sense. Don't use >/dev/null in combination with grep, use grep -q:

grep -qw "$governor" sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors || modprobe -q $mod

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to