Just need some help with a while read file from a specific column
I have a file with a few columns and I want to use while loop for a specific column
123
50012
1111
235
40023
2222
674
30021
3333
while read -a line; do echo -e ${line[0]} > /dev/null;
echo "this is $line"
done < /location/file
it gives the correct info
this is 123
this is 235
this is 674
It works fine until I run the script, it stops at first line
this is 123
and stops.
If I place the column 0 into a separate file and run it with a script using a different way it works fine.
while IFS= read -r -u "$fd_num" line; do
script goes here...
done {fd_num}< /location/file
this works great, but I would like to keep everything in one file.
Any help would be appreciated