Could be possible to use predefined variable after function is executed. Ex.:
var="host1 host2"
function test {
echo $1
echo $2
}
test var host3
Expected result should to be:
host1 host2
host3
Not sure how use define that variable like local or something else ...
test "$var" host3??