title: unable to run awk command as a shell script
body: <p>i am trying to create a shell script to search for a specific index in a multiline csv file. 
  the code i am trying is: </p>
  
  <pre><code>#!/bin/sh
  
  echo "please enter the line no. to search: "
  read line
  
  echo "please enter the index to search at: "
  read index
  
  awk -F, 'NR=="$line"{print "$index"}' "$1"
  </code></pre>
  
  <p>the awk command I try to use on the shell works absolutely fine. But when I am trying to create a shell script out of this command, it fails and gives no output. It reads the line no. and index. and then no output at all. 
  is there something I am doing wrong? </p>
  
  <p>I run the file at the shell by typing: </p>
  
  <pre><code>./fetchvalue.sh newfile.csv
  </code></pre>