Created
April 28, 2012 13:10
-
-
Save k4rtik/2518975 to your computer and use it in GitHub Desktop.
Simple script to let me know the temperatures of my laptop, hddtemp requires sudo making this script more than 3 lines.
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
#!/bin/bash | |
sensors | |
aticonfig --odgt | |
answer="N" | |
if [ "$(whoami)" != "root" ]; then | |
echo -ne "\n\nDo you want to know hard disk temperature (requires sudo)? (y/N) " | |
read answer | |
if [ "$answer" == "y" ]; then | |
{ | |
sudo hddtemp /dev/sda | |
} | |
else | |
{ | |
exit 0 | |
} | |
fi | |
else | |
echo | |
sudo hddtemp /dev/sda | |
exit 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment