Ive got a file called school.test and it looks like this:
David maths
Sam maths
Sam english
Simon french
Simon english
I want to write a for loop which reads this txt file up line by line and assign values that it is reading up on that line to different variables and run it through a command. Problem is I don't know how to set the first value as a variable and the second value as a different variable.
For example for the first line the for loop reads it would look something like this:
for line in `cat/home/school.test`
do
positionClient -name [variable=David] -class [variable=math]
done
and so on and so forth. How do I do this?