title: AWK with multiple delimiters
body: <p>I'm trying to insert tshark output to MySQL database. Tshark output has a format:</p>
  
  <pre><code>VALUE1:VALUE2_1|VALUE2_2|VALUE2_3:VALUE3_1,VALUE3_2,VALUE3_3:VALUE4:VALUE5
  </code></pre>
  
  <p>Currently I'm trying to redirect the output through the pipe to sed and awk:</p>
  
  <pre><code>|sed -u "s/^/insert into data (item1, item2, item3, item4, item5) values('/g"|awk -F":" -v OFS=',' '{print $1,$2}'
  </code></pre>
  
  <p>, but only some values are necessary. </p>
  
  <p>So that the resulting command must look like:</p>
  
  <pre><code>insert into data (item1, item2, item3, item4, item5) values(value1,value2_2,value3_2,value4,value5)
  </code></pre>
  
  <p>And some example from  development environment:</p>
  
  <p>Tshark permanently generates these kind of output:</p>
  
  <pre><code>1418043291.268345000:14567744356|4|8v95489464:DC0289001840,NNN100,DC206286661:03612037:ON1774B01
  1418043291.201703000:14567744356|0|6b10992051:DC0289001840,NNN120,DC081276320:04891241:ON891N619 
  </code></pre>
  
  <p>, where</p>
  
  <ol>
  <li>1418043291.268345000 - VALUE1</li>
  <li>14567744356|4|8v95489464 - VALUE2</li>
  <li>DC0289001840,NNN100,DC206286661 - VALUE3</li>
  <li>03612037 - VALUE4</li>
  <li>ON1774B01 - VALUE5</li>
  </ol>
  
  <p>For VALUE2 and VALUE3 is interested only the middle row, i.e "4" for VALUE2 and "NN100" for VALUE3. All of the other rows from these values (VALUE2, VALUE3) are not necessary for the further calculations from out side, that's why they must be discarded and the resulting insert command must looks like:</p>
  
  <pre><code>insert into data (item1, item2, item3, item4, item5) values(1418043291.268345000,4,NNN100,03612037,ON1774B01)
  </code></pre>
  
  <p>Could you please advise, how to modify the awk command for inserting values:</p>
  
  <pre><code> VALUE1:VALUE2_2:VALUE3_2:VALUE4:VALUE5 ? 
  </code></pre>