Are there any idioms for returning multiple values from a bash function within a script?
http://tldp.org/LDP/abs/html/assortedtips.html describes how to echo multipl
Yet another way:
function get_tuple() { echo -e "Value1\nValue2" } IFS=$'\n' read -d '' -ra VALUES < <(get_tuple) echo "${VALUES[0]}" # Value1 echo "${VALUES[1]}" # Value2