Here is the script:    echo '1 2 3 4 5 6' | while read a b c ;do    echo result: $c $b $a;    doneThe result is 3 4 5 6 2 1 Can someone explain why?
I cannot understand bash script results
bash;shell script
The final data on the line will be put in the last variable, i.e. c contains 3 4 5 6. So you probably want:echo '1 2 3 4 5 6' | while read a b c rest ;doecho result: $c $b $a;doneand ignore variable rest.