bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GROUPS


From: Franklin, Jason
Subject: GROUPS
Date: Mon, 09 Aug 2021 17:35:56 -0400
User-agent: Evolution 3.36.5-0ubuntu1

Greetings:

I discovered today that the GROUPS variable is special in Bash.

I moved some scripts to a new box, and they stopped working.  On this
box, /bin/sh linked to /bin/bash instead instead of /bin/dash.

Scripts of of this form...

  #!/bin/sh
  GROUPS='foo bar'
  # do something with $GROUPS here

had worked because GROUPS had no special meaning under /bin/dash.

The script is invoked with /bin/sh (linked to /bin/bash), so I had
expected Bash POSIX compliance to take over.  It did not.

Is this considered a bug?

Should bash, invoked with "--posix" or as "sh", omit the special
treatment of variables such as GROUPS?

-- 
Jason Franklin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]