URL:
  <https://savannah.gnu.org/bugs/?68885>

                 Summary: readonly variable can terminate command chain
                   Group: The GNU Bourne-Again SHell
               Submitter: None
               Submitted: Fri 06 Nov 2026 12:45:17 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 06 Nov 2026 12:45:17 AM UTC By: Anonymous
Erroneously trying to set a readonly variable can cause variant behaviour in
command line processing.

# all commands execute with or without not found reporting
a=0 someerror; echo "yep"
a=; echo "yep"

# a readonly variable can break that
readonly b=42

# these evaluate the echo yep
b=43 someerror; echo "yep"
b=43 echo "ok"; echo "yep"

# this does not.  it terminates processing at the semi-colon
b=43; echo "nope"          # does not echo

prompt$ b=43; echo "yep"
bash: b: readonly variable
prompt$ b=43 err; echo "yep"
bash: b: readonly variable
bash: err: command not found
yep








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68885>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to