ulfben

check-temperature.sh

Aug 10th, 2017
1,190
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. #!/bin/bash
  2. #check-temperature.sh - prints the value of all thermal sensors
  3. CELCIUS=$'\xc2\xb0'C
  4. for i in /sys/class/thermal/*/temp
  5. do
  6.         fileName="$i"
  7.         value=$(cat "$i")
  8.         value=$(echo "$value/1000.0" | bc) #basic calculator
  9.         printf "%s %.1f%s \\n" "$fileName" "$value" "$CELCIUS"
  10. done
Advertisement
Comments
  • Gyqizv
    217 days
    # text 0.21 KB | 0 0
    1. Best t33n active cpx link daily updates!
    2.  
    3. Copy and paste the link in a new browser tab and then hit enter!
    4.  
    5. https://crazyporn.@xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400
    6.  
    7. Remove the @
  • Comment was deleted
Add Comment
Please, Sign In to add comment