title: bash: extraction of substrings by pattern, empty fields and multiple occurrences
body: <p>I would like to extract the <code>Pfam_A</code> information from each line of a file:</p>
  <pre><code>item_1    ID=HJNANFJJ_180142;inference=ab initio prediction:Prodigal_v2.6.3;locus_tag=HJNANFJJ_180142;partial=01;product=unannotated protein;KEGG=K03531
  item_4    ID=HJNANFJJ_87662;inference=ab initio prediction:Prodigal_v2.6.3;locus_tag=HJNANFJJ_87662;partial=10;product=unannotated protein;KEGG=K15725;Pfam_A=OEP;Resfams=adeC-adeK-oprM
  item_8    ID=HJNANFJJ_328505;inference=ab initio prediction:Prodigal_v2.6.3;locus_tag=HJNANFJJ_328505;partial=11;product=unannotated protein;KEGG=K03578;Pfam_A=OB_NTP_bind    
  item_2    ID=HJNANFJJ_512995;inference=ab initio prediction:Prodigal_v2.6.3;locus_tag=HJNANFJJ_512995;partial=11;product=unannotated protein;KEGG=K00674;Pfam_A=Hexapep;Pfam_A=Hexapep_2;metacyc=TETHYDPICSUCC-RXN
  item_0    ID=HJNANFJJ_188729;inference=ab initio prediction:Prodigal_v2.6.3;locus_tag=HJNANFJJ_188729;partial=11;product=unannotated protein
  </code></pre>
  <p>In some lines this information is missing at all, in some there can be multiple occurrences.</p>
  <p>Finally, I want to get a table like this, so that instead of empty fields there is <code>NaN</code> and multiple occurrences are put tab separated into different fields:</p>
  <pre><code>item_1    NaN
  item_4    OEP
  item_8    OB_NTP_bind    
  item_2    Hexapep    Hexapep_2
  item_0    NaN
  </code></pre>