On Saturday 17 September 2005 21:43, DJ Lucas wrote:
> Allard Welter wrote:
> > info bash -> search "array" and we find:
> >
> > {quote}
> > Any element of an array may be referenced using
> > `${name['SUBSCRIPT`]}'.
> > {/quote}
>
> Yes, thanks Allard. That too...do not put a '$' character in front
> of the index variable when obtaining the value. I'm still not sure
> about when assigning, but it appears only to work with the '$' during
> assignment.
Actually it seems insensitive to the subscript's '$'. Twas the curly
braces that were missing. Also I didn't read the original query
properly - scope will catch all of us sooner or later. All the script
you posted was doing was verifying that echo did what it was told.
> I've yet to find an example where they are setup the way that I
> intend to use them however....every example I've found is of the
> type:
>
> name=(a b c d e f...)
>
> Where the assignments are in the script....I need very large string
> values from an outside source, but this is working well.
Can't help you here - maths and physics and all that. Strings are far
too fussy and pedantic (the letter ones that is).
Good luck
Allard.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page