title: convert 1 field of awk to base64 and leave the rest intact
body: <p>I'm creating a one liner where my ldap export is directly converted into a csv. 
  So far so good but the challange is now that 1 column of my csv needs to contain base64 encoded values. These values are comming as clear text out of the ldap search filter. So I basically need them converted during the awk creation.</p>
  
  <p>What I have is:</p>
  
  <pre><code>ldapsearch | awk -v OFS=',' '{split($0,a,": ")}  /^blobinfo:/{blob=a[2]} /^cn:/{serialnr=a[2]} {^mode=a[2]; print serialnr, mode, blob}'
  </code></pre>
  
  <p>This gives me a csv output as intended but now I need to convert blob to base64 encoded output.</p>
  
  <p>Getline is not available</p>
  
  <p>demo input:</p>
  
  <pre><code>cn: 1313131313
  blobinfo: a string with spaces
  mode: d121
  
  cn: 131313asdf1313
  blobinfo: an other string with spaces
  mode: d122
  </code></pre>
  
  <p>ouput must be like</p>
  
  <pre><code>1313131313,D121,YSBzdHJpbmcgd2l0aCBzcGFjZXM=
  </code></pre>
  
  <p>where <strong>YSBzdHJpbmcgd2l0aCBzcGFjZXM=</strong> is the encoded <strong>a string with spaces</strong></p>
  
  <p>but now I get</p>
  
  <pre><code>1313131313,D121,a string with spaces
  </code></pre>