How do I pass an array to a function, and why wouldn\'t this work? The solutions in other questions didn\'t work for me. For the record, I don\'t need to copy the array so I don
#!/bin/bash ar=( a b c ) test() { local ref=$1[@] echo ${!ref} } test ar