Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Greg Wooledge Newsgroups: gnu.bash.bug Subject: Re: Code addition to BASH Date: Tue, 21 Jan 2020 16:15:51 -0500 Lines: 11 Approved: bug-bash@gnu.org Message-ID: References: <20200121211551.GL851@eeg.ccf.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: usenet.stanford.edu 1579641391 27983 209.51.188.17 (21 Jan 2020 21:16:31 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org Mail-Followup-To: bug-bash@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 139.137.100.1 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200121211551.GL851@eeg.ccf.org> X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:15824 On Tue, Jan 21, 2020 at 04:14:52PM -0500, Chet Ramey wrote: > On 1/21/20 4:13 PM, William Theisen wrote: > > I've just tested this, it's a little awkward but does actually work. Thanks > > for the suggestion I'll play around with making it a little more > > convenient to use. Thanks for your time. > > If you don't want to destroy your script's positional parameters, you can > wrap your loop in a shell function, which has its own set. Or use an indexed array variable.