On Sun, 15 Oct 2023, 02:03 Robert Elz, wrote:
> Date:Sat, 14 Oct 2023 14:46:12 +1000
> From:Martin D Kealey
> Message-ID: a2+3nnknhm5a+...@mail.gmail.com>
>
>
> | Back when I used the Bourne Shell we didn't have `local`, so we used to
> | write `var= func` to ma
On Sun, 15 Oct 2023, 03:15 Ti Strga, wrote:
> On Fri, Oct 13, 2023 at 5:59 PM Grisha Levit
> wrote:
> > IMHO you'd be better off just putting a `{` line at the start and `}`
> line at the end of your scripts
>
The big weakness of the "{}" approach is that if a writer forgets to do
> that, there
On Sun, 15 Oct 2023, 03:05 Greg Wooledge, wrote:
> On Sat, Oct 14, 2023 at 12:55:21PM -0400, Ti Strga wrote:
> > it's just the "[[ -v foo ]]" tests to see where along the cloning
> process we are.
>
> *Shudder*
>
Likewise, b.
If the *real* goal is to overwrite a running script with a new ve
On Fri, Oct 13, 2023 at 5:59 PM Grisha Levit wrote:
> On Fri, Oct 13, 2023, 10:03 Ti Strga wrote:
>>
>> [*] Alternatively, there's the trick about putting the entire script
>> contents inside a compound statement to force the parser to read it all,
>> but that just makes the script harder for a h
On Sat, Oct 14, 2023 at 12:55:21PM -0400, Ti Strga wrote:
> it's just the "[[ -v
> foo ]]" tests to see where along the cloning process we are.
*Shudder*
I foresee so much more pain in your future. Seriously, this is going
to blow up in your face at some point. -v peeks into some incredibly
dar
On Fri, Oct 13, 2023 at 5:35 PM Chet Ramey wrote:
> This is what happens. First, you have to remember that variables supplied
> as temporary assignments to builtins like eval and source persist for the
> entire life of that builtin's execution, and appear in the environment of
> child processes th
Date:Sat, 14 Oct 2023 14:46:12 +1000
From:Martin D Kealey
Message-ID:
| Back when I used the Bourne Shell we didn't have `local`, so we used to
| write `var= func` to make sure that `func` couldn't mess with *our* `var`.
If you were using the original Bourne s