Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16564
| From | Ángel <angel@16bits.net> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Bash reference manual errata |
| Date | 2020-07-11 00:59 +0200 |
| Message-ID | <mailman.74.1594421988.2306.bug-bash@gnu.org> (permalink) |
| References | <C1E78C9C-3460-4F69-A0E0-77CDCDCFED03@gmail.com> <50b254a1-90e8-d1ca-264d-312caf9ea443@case.edu> <1594421977.1131.7.camel@16bits.net> |
On 2020-07-10 at 09:06 -0400, Chet Ramey wrote: > On 7/10/20 4:24 AM, 홍홍 wrote: > > In Bourne shell builtin(https://www.gnu.org/software/bash/manual/bash.html#Bourne-Shell-Builtins <https://www.gnu.org/software/bash/manual/bash.html#Bourne-Shell-Builtins>), shift command > > > > > > "Parameters represented by the numbers $# to $#-n+1 are unset." > > > > should be > > > > "Parameters represented by the numbers $1 to $#-n+1 are unset." > > No, the existing text is correct. If you have six positional parameters, > so $# == 6, and you execute `shift 2', $5 and $6 are unset. 홍홍 is right in that there is an error, although it is not the 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
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Bash reference manual errata Ángel <angel@16bits.net> - 2020-07-11 00:59 +0200
csiph-web