Skip to content

Instantly share code, notes, and snippets.

@pfactum
Created November 14, 2017 19:08
Show Gist options
  • Save pfactum/ae0c106e1f693e09146c6a4816c557bc to your computer and use it in GitHub Desktop.
Save pfactum/ae0c106e1f693e09146c6a4816c557bc to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
FILE="/sys/devices/system/cpu/cpu2/online"
while true; do
STATE=$(cat ${FILE})
if [[ "${STATE}" == "0" ]]; then
echo 1 >${FILE}
else
echo 0 >${FILE}
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment