bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comment on RFE: 'shift'' [N] ARRAYNAME


From: Chet Ramey
Subject: Re: comment on RFE: 'shift'' [N] ARRAYNAME
Date: Thu, 27 Sep 2018 10:20:31 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 9/27/18 8:42 AM, Dennis Williamson wrote:

> array_shift=2
> arr=("${arr[@]:$array_shift}")
> 
> Done.

This is the simplest and most elegant solution.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]