title: Altering multiple text files using grep awk sed perl or something else
body: <p>I have multiple text files named split01.txt, split02.txt etc... with the data in the format below: <strong>(This is what I have)</strong></p>
  
  <pre><code>/tmp/audio_files/n000001.wav;
  /tmp/audio_files/n000002.wav;
  /tmp/audio_files/n000003.wav;
  /tmp/audio_files/p000004.wav;
  /tmp/audio_files/p000005.wav;
  </code></pre>
  
  <p>I would like to create another file with the data taken from the split01.txt, split02.txt etc... file in the format below: <strong>(this is the format I would like to see)</strong></p>
  
  <pre><code>[playlist]
  NumberOfEntries=5
  
  File000001=n000001.wav
  Title000001=n000001.wav
  
  File000002=n000002.wav
  Title000002=n000002.wav
  
  File000003=n000003.wav
  Title000003=n000003.wav
  
  File000004=p000004.wav
  Title000004=p000004.wav
  
  File000005=p000005.wav
  Title000005=p000005.wav
  
  Version=2
  </code></pre>
  
  <p>Can this be done in one instance?  The reason I ask is that I'm going to be running/calling the command (awk,grep,sed,etc...) from inside of octave/matlab after the initial process has completed creating the audio files.</p>
  
  <p>example: of what I mean in one instance below:  (matlab/octave code)</p>
  
  <pre><code>  system(strcat({'split --lines=3600 -d '},dirpathwaveformstmp,fileallplaylistStr,{' '},dirpathwaveformstmp,'allsplit'))
  </code></pre>
  
  <p>This splits a single file into multiple files with the names allsplit01 allsplit02 etc.. and each file only has a max of 3600 lines.</p>
  
  <p>For those who asked this is creating playlist files for audio files I create with octave/matlab.</p>
  
  <p>Any suggestions?</p>