title: unix search a pattern on one column and remove those lines
body: <p>I am trying to search one column with a particular pattern, and eliminate those rows and create a new file without that pattern.</p>
  
  <p>Sample Data:</p>
  
  <pre><code>col1|col2|col3|col4
  abc|test123|demo|test
  def|test345|exam|write
  ghf|456|test|account
  ijk|789|travel|destination
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>col1|col2|col3|col4
  ghf|456|test|account
  ijk|789|travel|destination
  </code></pre>
  
  <p>I want to search for the pattern "test" in 2nd column, and remove those rows from the source file, and create a new file as shown in the expected output.
  File is a delimited file "|".</p>