title: Pipe sort into sed, match 5 or more digits at the end of a record?
body: <p>File</p>
  
  <pre><code>plym    fury    77      73      2500
  chevy   nova    79      60      3000
  ford    mustang 65      45      17000
  volvo   gl      78      102     9850
  ford    ltd     83      15      10500
  Chevy   nova    80      50      3500
  fiat    600     65      115     450
  honda   accord  81      30      6000
  ford    thundbd 84      10      17000
  toyota  tercel  82      180     750
  chevy   impala  65      85      1550
  ford    bronco  83      25      9525
  </code></pre>
  
  <p>I have to delete all cars that are $10,000 or more (last column in file). I have to pipe the output of the sort into a sed to do this, by quitting when a regular expression representing 5 or more digits is match at the end of a record.</p>
  
  <p>This is the command I have to pipe: <code>grep -iv chevy cars | sort -nk 5</code>  </p>
  
  <p>I tried so far:  </p>
  
  <p><code>grep -iv chevy cars | sort -nk 5 | sed -n '/[0-9]{5}*/'</code> </p>
  
  <p>but to no avail.</p>
  
  <hr>
  
  <pre><code>So far we have:
  
  grep -iv chevy cars | sort -nk 5
  
  Now let's delete the cars that are $10,000 or more.  Pipe the output of the sort into
  a sed to do this, by quitting as soon as we match a regular expression representing 5
  (or more) digits at the end of a record (DO NOT use repetition for this):
  
  You entered: grep -iv chevy cars | sort -nk 5 | sed -n '/[0-9]{5}$/'
  Please try again.
  </code></pre>