Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: =?ISO-8859-1?Q?=C1ngel?= Newsgroups: gnu.bash.bug Subject: Re: Bash reference manual errata Date: Sat, 11 Jul 2020 00:59:37 +0200 Lines: 38 Approved: bug-bash@gnu.org Message-ID: References: <50b254a1-90e8-d1ca-264d-312caf9ea443@case.edu> <1594421977.1131.7.camel@16bits.net> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1594421988 28287 209.51.188.17 (10 Jul 2020 22:59:48 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org In-Reply-To: <50b254a1-90e8-d1ca-264d-312caf9ea443@case.edu> Received-SPF: pass client-ip=199.195.249.9; envelope-from=angel@16bits.net; helo=mailer.hiddenmail.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/10 18:59:42 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: <1594421977.1131.7.camel@16bits.net> X-Mailman-Original-References: <50b254a1-90e8-d1ca-264d-312caf9ea443@case.edu> Xref: csiph.com gnu.bash.bug:16564 On 2020-07-10 at 09:06 -0400, Chet Ramey wrote: > On 7/10/20 4:24 AM, =ED=99=8D=ED=99=8D wrote: > > In Bourne shell builtin(https://www.gnu.org/software/bash/manual/bash.h= tml#Bourne-Shell-Builtins ), shift command > >=20 > >=20 > > "Parameters represented by the numbers $# to $#-n+1 are unset." > >=20 > > should be > >=20 > > "Parameters represented by the numbers $1 to $#-n+1 are unset." >=20 > No, the existing text is correct. If you have six positional parameters, > so $# =3D=3D 6, and you execute `shift 2', $5 and $6 are unset. =ED=99=8D=ED=99=8D is right in that there is an error, although it is not t= he mistake he thought. The text says "$# to $#-n+1" but $# > $#-n+1. It might be changed instead to say "$#-n+1 to $#". Or even better to use the same language as the man page: > Parameters represented by the numbers $# down to $#-n+1 are unset. bash.1 has contained this at least since bash-1.14.7 (August 1996), which is the earlies stored in bash git repository. And the "$# to $#-n+1" text on bashref.texi has been there at least since bash-2.0 (December 1996). The texif files on 1.14.7 didn't have a the large description of shift [n] Best regards