title: Storing values in an array using shell scripting
body: <p>This works fine since because i'm directly inputting the data.</p>
  
  <pre><code>declare -a arr
  arr=( $(awk '/123456789/{print NR}' filename) )
  echo ${arr[0]}
  echo ${arr[*]}
  </code></pre>
  
  <p>Bt when i do as below, it doesn't work. Can u let me know how the parameter 'name' can be used in the command below :</p>
  
  <pre><code>echo  Enter your search string:  
  read name
  declare -a arr
  arr=( $(awk '/"$name"/{print NR}' filename )
  echo ${arr[0]}
  echo ${arr[*]}
  </code></pre>