title: Timer Display script without clear
body: <p>I am seeking an alternative to clear, or a better way to write a timer script that I made. Essentially the script counts down from 20 minutes, then restarts from 20 minutes again. What I would like to do is avoid the blinking terminal that occurs every time clear is called, which is every second. Am I missing a better way to write this? Or am I basically stuck with clear and the blinking terminal?</p>
  
  <pre><code>totsecs=1200
  
  currsecs=0
  
  while true; do
  
      currsecs=$(($currsecs+1)) 
  
      min=$((totsecs-currsecs))
      min=$((min/60))
  
      sec=$((totsecs-currsecs))
      sec=$((sec%60))
  
      printf "%02d:%02d\n" $min $sec
  
      if [ $currsecs -eq $totsecs ]; then 
          currsecs=0
      fi  
  
      sleep 1
  
      clear
  
  done    
  </code></pre>