Web lists-archives.com

Re: BASH 4.4 mapfile/readarray/read builtins mis-behaving with pipe [edit] documentation bug

On Sat, 21 Jul 2018 19:36:38, BloomingAzaleas wrote:
At this time, I do not have a Linux image available to me.

its not that hard to get:

1. http://virtualbox.org
2. http://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid

you saw the same behavior on Fedora, then I suggest the behavior
originates upstream at or close the the GNU source-code level.

the behavior is documented by POSIX. Command grouping example:

   $ bash -c 'q=2; (q=3); echo "$q"'

and reference:

Execute compound-list in a subshell environment [...] Variable assignments and
built-in commands that affect the environment shall not remain in effect after
the list finishes.


pipe example:

   $ bash -c 'q=2; echo 3 | read q; echo "$q"'

and reference:

Changes made to the subshell environment shall not affect the shell
environment. [...] Additionally, each command of a multi-command pipeline is
in a subshell environment


For a doc counter-example, the Open Group doc at

its funny that you list this page, as thats exactly where i got my references.

Thank you for your response.


UN*X Since '85

finally i would say to stop top posting. for someone who is self declared unix
for 30 years, it seems odd that you cant even run fedora, or adhere to defacto
mailing list etiquette. Cheers.

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple