I am looking for a way to pass an array variable as an argument to a
function. The only remotely similar post I found dealt with spaces in
arguments, which is not my problem.
I want to pass three arguments to a function. I want to receive them as
three positional parameters, $1 (an array), $2 (a scalar integer), and $3
(another scalar integer). The integers are optional.
Currently, if I pass my array argument as ${arrayArg[@]}, the contents
actually expand to positional parameters $1, $2, ... $N. I could just
assume that the last two positional parameters are my two integer arguments,
but I'd like them to be optional. The size of the array is not fixed.