title: extracting information from a file using awk and storing it into a variable with bash
body: <p>i have a config file wiht the following content:</p>
  
  <pre><code>ip address file_location
  ip address file_location
  .
  .
  .
  .
  </code></pre>
  
  <p>i would like my script test.sh to read from this file the ip address and the file location : here is my code:</p>
  
  <pre><code>while read line ; do
  ip=`echo $line| awk '{print $1}'`
  done &lt;test.conf
  </code></pre>
  
  <p>Now, when i enter echo $ip (just to see if it works), it gives me blank. </p>