title: shell script to print sum of digits of the given num.In case of negative num is given as input, display Not a positive num as o/p
body: <p>I'm getting the proper output, but only for positive inputs.</p>
  
  <pre><code>read n
  g=$n
  s=0
  k=
  if [ $n -gt 0 ] ; then echo "Not a positive number"
  else
      while [ $n -gt 0 ]
         do
            k=$CC $n % 10 ))
            n=$CC $n / 10 ))
            s=$(C $s + $k ))
         done
  echo "Sum of digit for given number is $s"
  fi
  </code></pre>