next up previous contents
Next: Macro Calls Up: Dollar Bracket Expressions Previous: Conditional Expansion   Contents

Vector and String Subscription

The operator in table 6 allow vector and string subscriptions. A ${@: }-operator performs string subscription, a ${@ }-operator performs vector subscription. If only one index is specified, than only one specific element is returned. If two indices are given, the substring/sub-vector from the first to the last index is returned. If the second index is '-1' it is considered to be equal to the size of the vector/string.


Table 6: Vector and string subscription.
${@: string index0} specific letter in string
${@: string index0 index1} substring in string
${@ variable index0} specific element in vector variable
${@ variable index0 index1} sub-vector in vector variable



Frank-Rene Schaefer 2002-09-14