title: Text manipulation with grep or awk
body: <p>Wondering if somebody can help me with grep or awk. I have 2 files, the first one contains students IDs and a second that contains config files that relates to each student </p>
  
  <p>File 1 (oldstudent.txt)</p>
  
  <pre><code>    5678D956 
      45S87954
      56898K78
      4D856898
      556987F8
      23657D87
  </code></pre>
  
  <p>File 2 (app_path.config)</p>
  
  <pre><code>    /export/home/5678D956/Scripts
      /export/home/5678D956/FTP
      /export/home/5678D956/HomeDirs   
      /export/home/4487984D/Scripts
      /export/home/4487984D/FTP
      /export/home/4487984D/HomeDirs    
      /export/home/45S87954/Scripts
      /export/home/45S87954/FTP
      /export/home/45S87954/HomeDirs      
      /export/home/56898K78/Scripts
      /export/home/56898K78/FTP
      /export/home/56898K78/HomeDirs  
      /export/home/909878S4/Scripts
      /export/home/909878S4/FTP
      /export/home/909878S4/HomeDirs 
  </code></pre>
  
  <p>I would like to have it so that if a student exists in File 1, it comments out their configuration setting and saves as File 3 (app_path_new.config) </p>
  
  <pre><code>    #/export/home/5678D956/Scripts
      #/export/home/5678D956/FTP
      #/export/home/5678D956/HomeDirs
      /export/home/4487984D/Scripts
      /export/home/4487984D/FTP
      /export/home/4487984D/HomeDirs    
      #/export/home/45S87954/Scripts
      #/export/home/45S87954/FTP
      #/export/home/45S87954/HomeDirs      
      #/export/home/56898K78/Scripts
      #/export/home/56898K78/FTP
      #/export/home/56898K78/HomeDirs  
      /export/home/909878S4/Scripts
      /export/home/909878S4/FTP
      /export/home/909878S4/HomeDirs 
  </code></pre>
  
  <p>I have been trying with grep, sed and awk, and don't seem to be going anywhere.</p>
  
  <p>Thanks </p>