[Top][All Lists]

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

Re: Syntax Question...

From: Linda Walsh
Subject: Re: Syntax Question...
Date: Sat, 13 Aug 2011 21:55:15 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20100228 Thunderbird/ Mnenhy/

` Michael Witten wrote:
On Sat, Aug 13, 2011 at 23:41, Linda Walsh <address@hidden> wrote:
bash: ${#${!name}[*]}: bad substitution

It's probably what you're trying to avoid, but you'll probably have to
construct and then eval the right code by hand:

  $(eval "echo \${#$name[*]}")
bingo.  (sigh)

I refactored and am essentially using spaces to store the values in
a string, then when I want to check the, I throw them into an array and manip.
e.g. (not showing all supporting code)

  declare -axr _plst_t='_plist_'
 declare -axl defined_PLists=()

add things to the list...

   local -al plist_deps=( $plist )

{search for value in list, ...]

   unless ((found)) ; then
       eval "$plist=( "address@hidden" )"

reply via email to

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