Created
November 14, 2017 19:08
-
-
Save pfactum/ae0c106e1f693e09146c6a4816c557bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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