This can make it:
while read -r a b c
do
echo "first = $a second = $b third = $c"
done < file
Test
$ while read -r a b c; do echo "first=$a second=$b third=$c"; done < file
first=1 second=2 third=3
first=1 second=2 third=3
As the separator is a tab, you don't need to use IFS
. If it was for example a |
, you could do:
$ cat file
1|2|3
1|2|3
$ while IFS='|' read -r a b c; do echo "first=$a second=$b third=$c"; done < file
first=1 second=2 third=3
first=1 second=2 third=3