title: Bash read a valid phone number
body: <p>I am asked to write a script that accepts a 10 digit number i.e. <code>nnn-nnn-nnnn</code> The first number cannot start with a <code>0</code> and it has to be <code>10 digits long</code>. My thought is something like this below. </p>
  
  <pre><code># Create a field separator for each character/number inputed
  
  # if [ value [0] -eq 0 ] ; do (invalid entry)
  # if [ value [0] (is a number [1-9]) ] (move on to the next value in array)
  
  # if [ value[1] (is a number [0-9]) (move on to the next value in array)
  
  
  # all the way through the file....
  </code></pre>