Last active
September 2, 2015 00:49
-
-
Save karolherbst/5e4bffe5a7e4e6bd372d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if [[ -z "${CARD}" ]]; then | |
CARD='0' | |
fi | |
chipset=$(nvalist | head -$((${CARD} + 1)) | tail -1 | cut -d\ -f3) | |
nvapeek -c"${CARD}" $1 $2 | while read line; do | |
reg=$(echo $line | cut -d: -f1) | |
if [ ! "$reg" == "..." ]; then | |
for i in {2..5}; do | |
value=$(echo $line | cut -d\ -f$i) | |
if [ ! "$value" == "00000000" ]; then | |
reg_new=$(echo 16o$((0x$reg + 0x4 * ($i * 2)))p | /usr/bin/dc) | |
printf "$reg_new $value " | |
lookup -a"${chipset}" $reg_new $value | |
fi | |
done | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment