View original Gist on GitHub
Tags: #bash #array
#!/bin/bash function accept { local things=("${!1}") for thing in "${things[@]}" do echo "thing: $thing" done } things=(foo bar baz) accept things[@]