Is anyone able to help with writing a program that will do the following:
-
Read the contents of a file, line by line, and on each line, assign each of the two columns to a shell variable.
-
perform an action on the variables
-
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