Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14671

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

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: comment on RFE: 'shift'' [N] ARRAYNAME
Date 2018-09-27 10:20 -0400
Message-ID <mailman.1394.1538058045.1284.bug-bash@gnu.org> (permalink)
References <5BAAD017.4010806@tlinx.org> <CANaoh6Jgmm-+ovvJ-0D6x8bRCzwwTRiC-mTy-qqunmM39KPpLg@mail.gmail.com>

Show all headers | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: comment on RFE: 'shift'' [N] ARRAYNAME Chet Ramey <chet.ramey@case.edu> - 2018-09-27 10:20 -0400

csiph-web