bug-bash
[Top][All Lists]
Advanced

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

Re: Bash reference manual errata


From: Ángel
Subject: Re: Bash reference manual errata
Date: Sat, 11 Jul 2020 00:59:37 +0200

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





reply via email to

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