bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Severe Bash Bug with Arrays


From: DJ Mills
Subject: Re: Severe Bash Bug with Arrays
Date: Thu, 26 Apr 2012 16:41:24 -0400

On Thu, Apr 26, 2012 at 2:16 PM, Greg Wooledge <wooledg@eeg.ccf.org> 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[@]}"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]