I am trying to read from a file that is multiple lines with multiple variables per line. There are four variables: item, price, max_qty, and min_qty. The file looks like this:
item price
min_qty max_qty
I have tried:
while IFS=' ' read -r first second third fourth; do
echo "$first $second $third $fourth
done
This does not work. I want the output to be:
item price min_qty max_qty
I have also thought about somehow replacing the new lines with spaces and then reading from that line. I don't want to actually change the file though.