title: Shell: How to check available space and exit if not enough?
body: <p>I want to check if I do have enough space before executing my script.
  I thought about</p>
  
  <pre><code>#!/bin/bash
  set -e
  cd
  Home=$(pwd)
  reqSpace=100000000
  if [ (available Space) &lt; reqSpace ]
      echo "not enough Space"
      exit 1
  fi
  do something
  </code></pre>
  
  <p>The space I want to check via</p>
  
  <pre><code>df | grep $Home
  </code></pre>
  
  <p>Any suggestions?</p>