title: Only allow numbers from standard input (read command)
body: <p>i have a file that has a list of routes to .sh files, but to execute the scripts a date is needed, it the file the date is <code>YYYYMMD</code>. When I run the script that executes the list of scripts, i prompt the user for the date with the <code>read</code>command.</p>
  
  <p>My problem is that i need to be 100% sure that the date that the user inputs is at least all numbers, how can i do this? i have already made sure that the maximum chars inputed is 8, so all i need is to only allow the user to input numbers. This is all i have so far.</p>
  
  <pre><code>echo 'Input date (YYYYMMDD)'
  read -n 8 date
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thankyou.</p>