[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Syntax Question...
From: |
Michael Witten |
Subject: |
Re: Syntax Question... |
Date: |
Sun, 14 Aug 2011 02:43:03 +0000 |
On Sun, Aug 14, 2011 at 00:49, Dennis Williamson
<dennistwilliamson@gmail.com> wrote:
> On Sat, Aug 13, 2011 at 6:41 PM, Linda Walsh <bash@tlinx.org> wrote:
>>
>>
>>
>> I want to have an array of 'names'.
>>
>> given a name, "X", I had a prefix, _p_, so have _p_X,
>> I want to access / manipulate it as an array.
>>
>> so given I pass in a name in a var, I have to use 'indirect' syntax:
>>
>> ${!name}
>>
>> But that doesn't seem to play well with array syntax:
>>
>> ${#${!name}[*]}
>> bash: ${#${!name}[*]}: bad substitution
>>
>> What syntax would I use for this?
>
> Please read BashFAQ/006: http://mywiki.wooledge.org/BashFAQ/006
"no force in the universe can put NUL bytes into shell strings usefully"
Ain't that the goddamn Truth!
- Syntax Question..., Linda Walsh, 2011/08/13
- Re: Syntax Question..., Dennis Williamson, 2011/08/13
- Re: Syntax Question...,
Michael Witten <=
- Re: Syntax Question..., Linda Walsh, 2011/08/14
- Re: Syntax Question..., Pierre Gaston, 2011/08/14
- Re: Syntax Question..., Linda Walsh, 2011/08/14
- Re: Syntax Question..., Pierre Gaston, 2011/08/14
- Re: Syntax Question..., Linda Walsh, 2011/08/14
- Re: Syntax Question..., Dennis Williamson, 2011/08/14
- Re: Syntax Question..., Linda Walsh, 2011/08/14
- Re: Syntax Question..., Dennis Williamson, 2011/08/15
- Re: Syntax Question..., Linda Walsh, 2011/08/15
- Re: Syntax Question..., Linda Walsh, 2011/08/15