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
ar is not the first parameter to test - It is all the parameters. You'll have to echo "$@" in your function.
ar
echo "$@"