Review shell scripts

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-01-22 14:07:22 +00:00
parent 8f94687b2b
commit bcbda92c46
27 changed files with 273 additions and 259 deletions

View File

@@ -5,10 +5,10 @@ SEARCH_STRINGS=(
)
for search_string in "${SEARCH_STRINGS[@]}"; do
echo "Searching for devices matching: ${search_string}"
echo "Searching for devices matching: $search_string"
for f in $(grep -l "${search_string}" /sys/bus/usb/devices/*/product 2>/dev/null | sed "s/product/power\\/control/"); do
echo "Setting power control to 'on' for: ${f}"
echo on >| "${f}"
for f in $(grep -l "$search_string" /sys/bus/usb/devices/*/product 2>/dev/null | sed "s/product/power\\/control/"); do
echo "Setting power control to 'on' for: $f"
echo on >| "$f"
done
done