According to this answer: https://stackoverflow.com/a/1952480/582917
I can read in and therefore assign multiple variables.
However I want those variables to be local to a bash function so it doesn't pollute the global scope.
Is there a way to do something like:
func () {
local read a b <<< $(echo 123 435)
echo $a
}
func
echo $a
The above doesn't work. What is a good way of reading into local variables?