title: Convert text file to csv using shell script
body: <p>I have a file like this</p>
  <pre><code>InputFile.txt
  JOB JOB_A
    Source C://files/InputFile
    Resource 0 AC
    User Guest
    ExitCode 0 Success
  EndJob
  JOB JOB_B
    Source C://files/
    Resource 1 AD
    User Current
    ExitCode 1 Fail
  EndJob
  JOB JOB_C
    Source C://files/Input/
    Resource 3 AE
    User Guest2
    ExitCode 0 Success
  EndJob
  </code></pre>
  <p>I have to convert the above file to a csv file as below</p>
  <p><a href="https://i.stack.imgur.com/A5T4C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A5T4C.png" alt="enter image description here" /></a></p>
  <p>How to convert it using shell scripting?</p>