Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- TEMPERATURE=`cat /sys/class/thermal/thermal_zone0/temp`
- function print_usage {
- echo "Usage: $0 [delay time in seconds]"
- }
- SLEEP_TIME=2
- if [ "x$1" != "x" ]; then
- if [[ $1 == "-h" || $1 == "--help" ]]; then
- print_usage;
- exit 0;
- else
- SLEEP_TIME=$1;
- fi
- fi
- while [ 1==1 ]; do
- echo "scale=1; $TEMPERATURE/1000" | bc;
- sleep $SLEEP_TIME;
- done;
Add Comment
Please, Sign In to add comment