title: read IP address and check if valid/between range
body: <p>My current script:</p>
  
  <pre><code>#!/usr/local/bin/bash
  echo -n "Enter VPS IP address:"
  read userinput
  lookupip="vps $userinput"
  
  if [[ $userinput -lt 80.* || $userinput -gt 255.* ]] #checks input is in the range
   then
     echo "Input outside acceptable range."
   else
  
  #The grep removes all from VPS tool output except primary IP address
  
  $lookupip | grep -E -o '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' | sed '1 ! d' | xargs ping -oc 1000 -Q
  
  fi
  </code></pre>
  
  <p>The lowest IP address range is in the 80.X.X.X range, I've tried using:</p>
  
  <p>8*<br>
  80*<br>
  80.<em>.</em>.*</p>
  
  <p>But it always errors with:</p>
  
  <pre><code>line 10: [[: 80.X.X.X: syntax error in expression (error token is ".X.X.X")
  </code></pre>
  
  <p>What would be the best way to define a range of IP address less than (lt) and gt (greater than)?</p>