title: using awk in Bash script
body: <p>I am learning Bash scripts.
  my <code>data.txt</code> contains:</p>
  
  <pre><code>A Orange
  B Apple
  </code></pre>
  
  <p>I have tried </p>
  
  <pre><code>echo "enter"
  read fruit
  awk -F'[: ]' '$2 == "Apple"' data.txt
  a=`awk -F'[: ]' '\$2 == "$fruit"' data.txt` # returns null
  echo "$a"
  </code></pre>
  
  <p>Why isn't my awk command is not working when I am using my variable 'a' with it?</p>