(I wrote):
>> https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_02
>> I don't read POSIX specs. I have people who read POSIX specs.
(And Chet wrote):
> Consider asking them first. They're your people, after all.
Good one! Well done.
On 6/30/25 10:20 AM, Stan Marsh wrote:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_02
I don't read POSIX specs. I have people who read POSIX specs.
Consider asking them first. They're your people, after all.
--
``The lyf so short, the craft so long
(I wrote):
>> 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 colon in the
>> format
>> results
On 6/29/25 10:13 AM, Stan Marsh wrote:
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 colon in the
format
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
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
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
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
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
>"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
On Sat, Jun 28, 2025, at 10:00 PM, Wiley Young wrote:
> I don't see any other written instances of omitting a ':' amongst the
> examples in these x4 descriptions.
>
> Whether the existing omission was intentional or no, I think it would be
> helpful for the reader to point up how that one line of c
On Wed, 25 Jun 2025 14:00:11 -0400 Greg Wooledge wrote:
> Both of those are valid syntax, and they have *slightly* different
meanings.
True, both forms are syntactically valid.
It could be, at some earlier draft, that the variation in syntax was placed
there as an exercise for the reader, given h
On Wed, Jun 25, 2025 at 17:47:31 +, Wartik, Steven P "Steve" via Bug
reports for the GNU Bourne Again SHell wrote:
> After many years of staring at the Bash Reference Manual, I just noticed a
> typo in Section 3.5.3 (Shell Parameter Expansion):
>
> [cid:image003.jpg@01DBE5D7.B1DBC120]
>
> T
13 matches
Mail list logo