[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where is the syntax of ${array[@]:1:2} described?
From: |
Peng Yu |
Subject: |
Re: Where is the syntax of ${array[@]:1:2} described? |
Date: |
Thu, 8 Jul 2010 22:27:49 -0500 |
I find the following. But this is for string according to the
highlighted word "Substring Expansion".
${parameter:offset:length}
Substring Expansion. Expands to up to length characters of
....
The following description is actually for array. Therefore, I suggest
to put this into the array section and add references between the two
sections.
..................... If
parameter is @, the result is length positional parameters
beginning at offset. If parameter is an indexed array
name sub\u2010
.....
On Thu, Jul 8, 2010 at 9:27 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
> Hi,
>
> array=(a b c)
> echo ${array[@]:1:2}
>
>
> I'm looking for the document for the above usage. I checked the Arrays
> section of man bash, but I don't see a description of such usage. I
> also searched man bash with [0-9]+:[0-9]+. But I still don't find a
> description. Could anybody let me know where this is documented?
>
> --
> Regards,
> Peng
>
--
Regards,
Peng