Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. while [[ true ]]
  4. do
  5.         temp=`sensors 2>/dev/null|grep -m1 temp1|awk '{print $2}'|sed 's/[+°C]//g'`
  6.         if [[ $temp > 64 ]]; then
  7.                 echo -ne "\r" $temp "-> waiting..."
  8.                 sleep 1
  9.         else
  10.                 echo -ne "\r" $temp "-> "'\E[33;31m'"heating..."
  11.                 tput sgr0
  12.                 curSec=`date |cut -c 19`
  13.                 while [[ $curSec == `date |cut -c 19` ]]; do echo "coal">/dev/null; done
  14.         fi
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement