title: Extract column data from csv file based on row values
body: <p>I am trying to use awk/sed to extract specific column data based on row values. My actual files have 15 columns and over 1,000 rows (From a .csv file.) </p>
  
  <p>Simple EXAMPLE: Input; a cdv file with a total of 5 columns and 100 rows. Output; data from column 2 through 5 based on specific row values from column 2. (I have a specific list of the row values I want the operator to filter out. The values are numbers.) </p>
  
  <p>File looks like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>"Date","IdNo","Color","Height","Education"
  "06/02/16","7438","Red","54","4"
  "06/02/16","7439","Yellow","57","3"
  "06/03/16","7500","Red","55","3" 
  </code></pre>
  
  <p>Recently Tried in AWK:</p>
  
  <pre><code>#!/usr/bin/awk -f 
  #I need to extract a full line when column 2 has a specific 5 digit    value
  awk '\
  BEGIN { awk -F "," \    
  {
      if ( $2 == "19650" ) { \
         {print $1 "," $6} \ 
  }
  exit }     
  
  chmod u+x PPMDfUN.AWK
  </code></pre>
  
  <p>The operator response:</p>
  
  <pre><code>/var/folders/1_/drk_nwld48bb0vfvdm_d9n0h0000gq/T/PPMDfUN-     489939602.998.AWK.command ; exit;
  /usr/bin/awk: syntax error at source line 3 source file    /private/var/folders/1_/drk_nwld48bb0vfvdm_d9n0h0000gq/T/PPMDfUN-   489939602.997.AWK
  context is
  awk &gt;&gt;&gt;  ' &lt;&lt;&lt; 
  /usr/bin/awk: bailing out at source line 17
  logout
  </code></pre>
  
  <p>Output Example: I want full row lines based if column 2 equals 7439 &amp; 7500.</p>
  
  <pre class="lang-none prettyprint-override"><code>“Date","IdNo","Color","Height","Education"
  "06/02/16","7439","Yellow","57","3"
  "06/03/16","7500","Red","55","3" 
  </code></pre>