[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stumped on a question of scoping and unset.
From: |
Greg Wooledge |
Subject: |
Re: Stumped on a question of scoping and unset. |
Date: |
Thu, 26 May 2011 08:18:00 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, May 25, 2011 at 05:15:28PM -0400, Steven W. Orr wrote:
> In addition, I wrote (what I thought was pretty clever) a function
> called glob_array:
> glob_array()
> {
[[ snip ]]
> while (( $# ))
> do
> arrayname=$1
> pattern="$2"
> aval=( $pattern )
Looks like what it's trying to do is:
glob_array arrayname '*.txt' # equivalent to arrayname=(*.txt)
Right? (I mean, we have to guess, because you didn't tell us what it's
trying to do.) So why not simply do:
arrayname=(*.txt)
and be done with it? Then you wouldn've have wasted hours and hours
on this nightmarish contraption from hell.