title: Using awk command in Bash
body: <p>I'm trying to loop an awk command using bash script and I'm having a hard time including a variable within the single quotes for the awk command. I'm thinking I should be doing this completely in awk, but I feel more comfortable with bash right now. </p>
  
  <pre><code>#!/bin/bash
  
  index="1"
  
  while [ $index -le 13 ]
  do
  
      awk "'"/^$index/ {print}"'" text.txt
  
  done
  </code></pre>