Re: Typo in Bash Reference Manual

2025-06-29 Thread Robert Elz
Date:Sun, 29 Jun 2025 08:13:07 -0600 From:Stan Marsh Message-ID: | So, is this POSIX, or just a dash-extension? It is original Bourne Shell (from 7th edition Bell Labs Unix) and is (or should be) supported by every Bourne-compatible shell. It definitely is in POS

Re: Typo in Bash Reference Manual

2025-06-29 Thread Stan Marsh
>"Note that a negative offset must be separated from the [non-following] >colon by at least one space to avoid being confused with the ':-' >expansion,' since a negative offset can exist immediately beside a >subsequent colon. >Wiley Note, incidentally, that it is not strictly true that a negat

Re: Typo in Bash Reference Manual

2025-06-29 Thread Stan Marsh
And here is another interesting thing inspired by this thread. I always thought the "colon-free" versions of the P.E. was a bash-ism, but experimentation shows that it works in "dash" as well. And "man dash" contains the following text: In the parameter expansions shown previously, use of the

Re: Typo in Bash Reference Manual

2025-06-29 Thread Greg Wooledge
On Sun, Jun 29, 2025 at 21:51:52 +0700, Robert Elz wrote: > Date:Sun, 29 Jun 2025 08:13:07 -0600 > From:Stan Marsh > Message-ID: > > | So, is this POSIX, or just a dash-extension? > > It is original Bourne Shell (from 7th edition Bell Labs Unix) > and is (or shoul

Re: Typo in Bash Reference Manual

2025-06-29 Thread Greg Wooledge
On Sun, Jun 29, 2025 at 06:39:18 -0600, Stan Marsh wrote: > Note, incidentally, that it is not strictly true that a negative offset has > to be preceded by a space. A zero will work as well. And I think that is > clearer. I.e., instead of: > > # Print the last 2 characters of $HOME > $ echo ${H

Re: Typo in Bash Reference Manual

2025-06-29 Thread Lawrence Velázquez
On Sun, Jun 29, 2025, at 11:41 AM, Greg Wooledge wrote: > The colon variants ${var:-word} were added later, IIRC by ksh. Looks like the System III shell released them first: https://www.in-ulm.de/~mascheck/bourne/#system3 -- vq