title: while loop | reverse counting n....8 7 6 5 4 3 2 1
body: <p>I am trying to get an automatic reverse counting with user input.
  The error is I keep getting the first number in the sequence twice.</p>
  
  <pre><code>#!/bin/bash
  #Print decremental numbers based on user input
  #n...8 7 6 5 4 3 2 1
  echo "Input number"
  read k
  while test $k != 0
  do
      echo "$k"
      k="$(( k - 1 ))"
  done
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[root@localhost standalone_scripts]# . ./decr.sh
  Input number
  5
  5
  4
  3
  2
  1
  </code></pre>