On Thu, Apr 26, 2012 at 2:16 PM, Greg Wooledge <[email protected]> wrote: > If the goal is to see the contents of an array, I'd use one of these, > depending on how much detail I need: > > printf '<%s> ' "${array[@]}"; echo > > declare -p array >
Or i'd use the args function Greg has shown before:
args() { printf '%d args:' "$#"; printf ' <%s>' "$@"; echo; }
args "${array[@]}"
