I am trying to use a bash script to input from a colon delimited file and insert these values into a mysql database. What I have so far is the ability to cut these appropriately and print them out, but I don't know how to manipulate data with each run of the cut.
ie.
cut -d: -f1 input.txt | \
while read firstVal;
do
echo firstVal;
done
From this, it looks like I would be able to place a mysql insert line in place of where I am echo'ing the name to achieve what I want to do. So I can do the same thing for the second value by replacing f1 with f2, but I don't know how to use multiple values at the same time and then insert f1, f2, f3 etc. Any ideas?