Bash Multiple Variable Assignment

“Does exist in linux bash something similar to the following code in PHP:\r\n\r\n list($var1, $var2, $var3) = function_that_returns_a_three_element_array() ;\r\n\r\ni.e. you assign in one sentence a corresponding value to 3 different variables.\r\n\r\nLet's say I have the bash function myBashFuntion that writes to stdout the string "qwert asdfg zxcvb".\r\nIs it possible to do something like:\r\n\r\n (var1 var2 var3) = ( myBashFuntion param1 param2 )\r\n\r\nThe part at the left of the equal sign is not valid syntax of course. I'm just trying to explain what I'm asking for.\r\n\r\nWhat does work, though, is the following:\r\n\r\n array = ( myBashFuntion param1 param2 )\r\n echo ${array[0]} ${array[1]} ${array[2]}\r\n\r\nBut an indexed array is not as descriptive as plain variable names. \r\nHowever, I could just do:\r\n\r\n var1 = ${array[0]} ; var2 = ${array[1]} ; var3 = ${array[2]}\r\n\r\nBut those are 3 more statements that I'd prefer to avoid.\r\n\r\nI'm just looking for a shortcut syntax. Is it possible?” <a href=““https://stackoverflow.com/questions/1952404/linux-bash-multiple-variable-assignment"">— “GetFree”