Awk/shell question: Read from file and assign to variables.

Is anyone able to help with writing a program that will do the following:

  1. Read the contents of a file, line by line, and on each line, assign each of the two columns to a shell variable.

  2. perform an action on the variables

  3. Read the next line.

Here is what I've gotten so far. it doesn't work, and I only present it to give a better idea of what I am getting at:

for i in `cat inputfile|eval \`awk '{print "HOST="$1; print "PASS="$2;}'\``
do
echo "Action: host is $HOST and pass is $PASS"
echo
done

Any assistance is greatly appreciated
akbar

I think I've got a solution:

while read line; do
echo $line | eval `awk '{print "export HOST="$1; print "export PASS="$2;}'`
echo "Host is $HOST and PASS is $PASS"

done < $PASSLIST

how about

while read HOST PASS
do
      echo "HOST = $HOST  PASS = $PASS"
done < $PASSLIST

Excellent! Thank you.

akbar