title: Assing a variable and use it inside of if statement shell scripting
body: <p>I am new to shell scripting and trying to make a few small scripts. I got stuck when i tried to write if condition. In the code below i am trying to get the $5 value from df and trying to use it in if condition. However the code doesn't work. </p>
  
  <pre><code> #!/bin/sh
  
  temp = $(df -h | awk '$NF=="/"{$5}')
  if [ $temp &gt; 60 ] ; then
   df -h | awk '$NF=="/" {printf("%s\n"),$5}'
   (date -d "today" +"Date:%Y.%m.%d"" Hour: %H:%M")
  fi
  
  #end
  </code></pre>
  
  <p>So i've figured out something and changed my code into this:</p>
  
  <pre><code>temp=$(df -h | awk '$NF=="/"{$5}')
  if [ "$((temp))" -gt 0 ] ; then
   df -h | awk '$NF=="/" {printf("%s\n"),$5}'
   (date -d "today" +"Date:%Y.%m.%d"" Hour: %H:%M")
  fi
  
  #end
  </code></pre>
  
  <p>And now , i'm trying to get the integer value of the $5 variable. It returns a percentage and i want to compare this percentage with %60. How can i do that ?</p>