title: Error in logic probably
body: <p>I'm teaching myself bash</p>
  
  <p>How can I make this work?</p>
  
  <p>There are three check points... No blank lines, No special characters and 
  No numbers less than 1 and greater than the biggest number</p>
  
  <p>However, on the third checkpoint, if you try to enter a special character, the whole thing comes tumbling down like a house of card.</p>
  
  <p>How can I make sure the user doesn't enter a blank line, no special characters and no number less than 1 and greater than a predetermined biggest number?</p>
  
  <p>read -p "Please enter the line number: " line_number</p>
  
  <pre><code># First checkpoint
  # No blank lines accepted as input
  while [[ -z "$line_number" ]] ;
  do
  echo
  echo "Line number can not be blank."
  echo
  read -p "Please enter a valid line number? " line_number
  echo
  done
  
  # Second checkpoint
  # No special characters allowed as input
  # Escaping the backtick or accent grave requires three back slashes before the backtick
  while [[ $line_number == *['!'@#\$%^\&amp;*()_+?~-\"\\\`]* ]] ; 
  do
  echo
  echo "No special characters allowed"
  echo
  read -p "Please enter a valid line number? " line_number
  echo
  done
  
  # Third checkpoint
  # No number less than 1 and greater than the $total_line_number
  while [[ $line_number -lt 1 || $line_number -gt $total_line_number ]] ; 
  do
  echo
  echo -e "Line number can not be lesser than 1$ and bigger than              $total_line_number."
  echo 
  read -p "Please enter a number between the 1 and  $total_line_number scope? " line_number
  echo
  done
  </code></pre>