title: bash while loop to delete a line from a file
body: <p>I have a dataset that I call 'chuck' and I need to get rid of one recurring line
  and I don't want to use sed or grep -v to a tmp file. I wwant to
  use a while loop, and pattern recognition.</p>
  
  <pre><code>D,642,0642,UBF,FOO,,M,,L,L,HPQ,9926,11080,
  D,642,0642,UBF,FOO,,M,,S,S,IBM,11062,5122,
  D,642,0642,UBF,FOO,,M,,S,S,INTC,35216,39833,
  D,642,0642,UBF,FOO,,M,,S,S,FARFERNUGEN,213,213,
  D,642,0642,UBF,FOO,,M,,L,L,JNJ,15607,12714,
  D,642,0642,UBF,FOO,,M,,L,L,JPM,51225,40013,
  </code></pre>
  
  <p>SO I am catting out the file I call 'chuck' and I am trying to run this through a while loop and I am trying
  to get each string though the while loop except the string that
  I am trying to get out. What am I doing wrong here.  Because the output is exactly the same.</p>
  
  <pre><code>#!/bin/bash
  pattern="D,642,0642,UBF,FOO,,M,,S,S,Farfegnugen,213,213,"
  cat /tmp/chuck | while read line
  do
     [[ ! $s =~ "$pattern" ]] &amp;&amp; echo $line
  done
  </code></pre>