title: Trying to read from file within existing for loop
body: <p>Hello I am having a hard time figuring out how to complete the existing script I have written. In a nutsheel I am trying to set disk quotas based on an existing user for any user that doesn't have a quota set to 100MB or <code>102400</code> as below in the script. The logic seems to work currently but I have ran out of ideas for how to populate the <code>$USER</code> variable. Any help would be appreciated.</p>
  
  <pre><code>AWK=$(awk '{ print $4 }' test.txt)
  
  USER=$(awk '{ print $1 }' test.txt)
  
  for quota in $AWK;
  do
      if [ "$quota" = 102400 ];
      then
          echo "Quota already set to 100MB for user: "$USER""
      else
          echo "Setting quota from template for user: $USER "
          edquota -p username "$USER"
      fi
  done
  </code></pre>
  
  <hr>
  
  <p>The <code>test.txt</code> file is below:</p>
  
  <pre><code>user1   --  245 0   0
  user2   --  245 102400  102400
  user3   --  234 102400  102400
  user4   --  234 1   0
  </code></pre>