I am new to bash scripting. I want to read a file containing a table line by line. At each line I want to assign the values to variables. This is basically the format of my code:
#!/bin/bash
while IFS= read -r line; do
echo $a $b $c $d
#if statements…
done < test.txt
I get this error: "While loop error: syntax error near unexpected token `done' "
Any idea what is wrong with my code? I have tried looking at several other questions related to the same error, but I was not able to fix my code. Thank you for your help!
