help-bash
[Top][All Lists]
Advanced

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

Re: why does </proc/self/environ not work in bash?


From: Zachary Santer
Subject: Re: why does </proc/self/environ not work in bash?
Date: Mon, 12 Feb 2024 15:49:03 -0500

On Mon, Feb 12, 2024 at 2:56 PM Chet Ramey <chet.ramey@case.edu> wrote:

> POSIX makes that explicitly unspecified. Is it worth breaking backwards
> compatibility for?
>

Would it affect something other than side-effects from arithmetic
expansions still being present in the shell? I guess also
${parameter:=word}. It would be so weird for a script to be dependent on
this behavior. Why use an arithmetic expansion that would normally have
side effects unless you wanted those side-effects to occur? Even more so
for the assign default values parameter expansion. This is such a funky
edge case that the user even being aware of it in the first place seems
like a pretty big ask.

I guess you could have the behavior toggled by a compat* shell option,

It seems valuable for Bash to behave a little more like the user would
intuit that it should.


reply via email to

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