title: Bash - disk utilization notification
body: <p>This script should output a warning notification for the utilization of the main disk if over 50%, but it provides no output. My disk is currently sat at 60% so it should in theory work.</p>
  
  <p>I have added an else statement to identify if the loop is not working but the else statement isnt triggered.</p>
  
  <p>I'm provided no error so its hard to identify where i have gone wrong specifically.</p>
  
  <pre><code>#!/bin/bash
  
  df -H | grep /dev/sda2 | awk '{ printf "%d", $5}' &gt; diskOutput.txt
  
  input="diskOutput.txt"
  while IFS= read -r line
  do
          if [ $line -gt 50 ]
          then
                  up="`uptime | cut -b 1-9`"
                  output="WARNING UTILISATION $line - $up"
                  echo "$output"
          else
                  echo "no-in"
          fi
  
  done &lt; $input
  #rm diskOutput.txt
  echo "finished"
  </code></pre>