title: Set variable from awk while parsing lines from a multiline file
body: <p>I've got a txt file with several lines, each one describing a remote server, like this:</p>
  
  <pre><code>user@server:port:remote_working_path:whether_using_VPN
  </code></pre>
  
  <p>The : char separates the 4 fields.</p>
  
  <p>I need to operate batch actions within each server, hence I need to parse each line and set appropriate variables. Right now, what I've coded is this:</p>
  
  <pre><code>while read server;
  do
          echo "$server" | awk -F ':' '{print $1}' &amp;&amp;
          echo "$server" | awk -F ':' '{print $2}' &amp;&amp;
          echo "$server" | awk -F ':' '{print $3}'
          echo "$VPN"
          declare $( echo "$server" | awk -F ':' '{print $VPN=$4}' )
          echo 'VPN: '$VPN
  done &lt; $CUSTOMER_SERVERS_FILE
  </code></pre>
  
  <p>This script only prints the first 3 fields, and in my intentions should also set $VPN variable as the 4th field. However this seems way broken, and I'm being unable to fix it. How should I modify it so that $VPN = $4?</p>