public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Steven Penny <svnpenn@gmail.com>
To: cygwin@cygwin.com
Subject: Re: BASH 4.4 mapfile/readarray/read builtins mis-behaving with pipe [edit] documentation bug
Date: Mon, 23 Jul 2018 02:15:00 -0000	[thread overview]
Message-ID: <5b53d1e2.1c69fb81.54df5.5236@mx.google.com> (raw)
In-Reply-To: <30b851ee-7144-345c-926d-8a08d9a6a27c@verizon.net>

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"'
    2

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.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_01

pipe example:

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

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

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_12

> For a doc counter-example, the Open Group doc at
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

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

> Thank you for your response.
>
> Regards,
>
> 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

  reply	other threads:[~2018-07-22  0:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 12:57 BASH 4.4 mapfile/readarray/read builtins mis-behaving with pipe BloomingAzaleas
2018-07-17 12:57 ` Steven Penny
2018-07-18 11:17 ` BASH 4.4 mapfile/readarray/read builtins mis-behaving with pipe [edit] documentation bug BloomingAzaleas
2018-07-21  1:19   ` Eric Blake
2018-07-22  5:42     ` BloomingAzaleas
2018-07-23  2:15       ` Steven Penny [this message]
2018-07-23  6:32         ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b53d1e2.1c69fb81.54df5.5236@mx.google.com \
    --to=svnpenn@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).