title: How can I transfer certain data from the zsim.out files in these directories to CSV files?
body: <p>I need some help with transferring information from certain files to a CSV. I have this directory (hw4 in the image below), which contains various other directories (DRRIP, EHC_DRRIP, etc.). Within those, there are more directories (blackscholes, bodytrack, etc.). Now inside each of those directories there is a file called zsim.out that looks like the image below. I need to transfer the information from these file (namely the cycles, cCycles, instrs, mGETS, mGETXIM, mGETXSM) and paste them in a CSV. This is a lot of information, and I would like the CSV to look something like:</p>
  <pre><code>         blackscholes, bosytrack, bzip2, cactusAMD
  cycles.     ##.            ##.      ##.     ##
  cCycles
  instrs
  mGETS
  mGETXIM
  mGETXSM
  </code></pre>
  <p>etc.</p>
  <p>I have attached the images of the directory hierarchy and of the file itself (the lines of interest, I believe, are 16-18). I have tried something like the below code (it won't work well), but I cannot seem to get it to work properly. Any help would be super appreciated.</p>
  <pre><code>awk '{print FILENAME,$2,$4,$6}' FS=':|\n' OFS=, RS= file*.txt
  </code></pre>
  <p><a href="https://i.stack.imgur.com/vbw38.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vbw38.jpg" alt="w" /></a></p>
  <p><a href="https://i.stack.imgur.com/xyU6W.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xyU6W.jpg" alt="enter image description here" /></a></p>