Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14254 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2018-06-20 10:42 -0400 |
| Last post | 2018-06-20 10:42 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: propagating environment variable via internal command Chet Ramey <chet.ramey@case.edu> - 2018-06-20 10:42 -0400
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2018-06-20 10:42 -0400 |
| Subject | Re: propagating environment variable via internal command |
| Message-ID | <mailman.2298.1529505743.1292.bug-bash@gnu.org> |
[Multipart message — attachments visible in raw view] — view raw
On 6/20/18 9:25 AM, Tomáš Čech wrote: > Hi, > > > when comparing strange behaviors of different shell implementations Tomas > Janousek found this bug > > When using BASH as sh shell... > > $ ls -l /bin/sh > lrwxrwxrwx 1 root root 4 Jun 13 16:25 /bin/sh -> bash > > ...internal shell command `set' propagates environment variable to the > process its running: > > $ /bin/sh > sh-4.4$ VARIABLE=value set -o noglob > sh-4.4$ env | grep VARIABLE > VARIABLE=value > sh-4.4$ Posix requires this behavior, which dates back to the Bourne shell, for assignment statements that precede special builtins: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 It used to require the same behavior for assignment statements preceding shell function calls, but that was removed in the most recent update. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to top | Article view | gnu.bash.bug
csiph-web