[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GROUPS
From: |
Greg Wooledge |
Subject: |
Re: GROUPS |
Date: |
Wed, 11 Aug 2021 20:36:57 -0400 |
On Wed, Aug 11, 2021 at 08:00:12PM -0400, Franklin, Jason wrote:
> This doesn't work unless it was recently fixed. A variation does...
>
> bash-5.0$ echo $BASH_VERSION
> 5.0.17(1)-release
> bash-5.0$ GROUPS=FOO bash -c 'echo $GROUPS'
> 1000
> bash-5.0$ GROUPS=FOO bash --posix -c 'echo $GROUPS'
> 1000
> bash-5.0$ env GROUPS=FOO bash -c 'echo $GROUPS'
> FOO
> bash-5.0$ env GROUPS=FOO bash --posix -c 'echo $GROUPS'
> FOO
You can't overwrite GROUPS while you're inside of bash, apparently not
even in the temporary assignment context before a simple command. So,
in order for the first form to work as expected, you'd have to be in a
shell other than bash.
unicorn:~$ ksh
$ GROUPS=FOO bash -c 'echo "$GROUPS"'
FOO
And so on. Either that, or unset GROUPS first.
- Re: GROUPS, (continued)
- Re: GROUPS, Andreas Schwab, 2021/08/11
- Re: GROUPS, Chet Ramey, 2021/08/11
- Re: GROUPS, Robert Elz, 2021/08/11
- Re: GROUPS, Chet Ramey, 2021/08/11
- Re: GROUPS, Robert Elz, 2021/08/12
Re: GROUPS, Chet Ramey, 2021/08/10
Re: GROUPS, Franklin, Jason, 2021/08/10
Re: GROUPS, Franklin, Jason, 2021/08/11
- Re: GROUPS,
Greg Wooledge <=
- Re: GROUPS, Chet Ramey, 2021/08/13
- Re: GROUPS, Franklin, Jason, 2021/08/13
- Re: GROUPS, Dale R. Worley, 2021/08/16
- Re: GROUPS, Robert Elz, 2021/08/17
- Re: GROUPS, Dale R. Worley, 2021/08/20