[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature suggestion: ability to expand a set of elements of an array
From: |
Zachary Santer |
Subject: |
Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices |
Date: |
Wed, 26 Jun 2024 14:37:29 -0400 |
On Wed, Jun 26, 2024 at 2:30 PM Chet Ramey <chet.ramey@case.edu> wrote:
>
> On 6/26/24 2:18 PM, Zachary Santer wrote:
>
> >> On Tue, Jun 11, 2024, 12:49 PM Zachary Santer <zsanter@gmail.com> wrote:
> >>>
> >>> $ array=( zero one two three four five six )
> >>> $ printf '%s\n' "${array[@]( 1 5 )}"
> >>> one
> >>> five
> >
> > This is different functionality.
>
> Equivalent to printf '%s\n' "${array[1}" "${array[5]}". The innovation Zach
> wants is to have a single word expansion to do this.
Yes, but of course the set of indices you need could be determined
dynamically, in which case the above isn't going to work.
- feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/11
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Chet Ramey, 2024/06/26
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, alex xmb sw ratchev, 2024/06/26
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/26
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, alex xmb sw ratchev, 2024/06/26
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Chet Ramey, 2024/06/26
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, alex xmb sw ratchev, 2024/06/26
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices,
Zachary Santer <=
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Martin D Kealey, 2024/06/26
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Oğuz, 2024/06/27
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/27
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Martin D Kealey, 2024/06/28
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Oğuz, 2024/06/28
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Martin D Kealey, 2024/06/29
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/27
- Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/27
Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices, Zachary Santer, 2024/06/28