FYI, if I attempt to read into the built-in array variable, GROUPS,
this doesn't work:

  $ bash -c 'while read GROUPS; do echo $GROUPS; done < /etc/passwd'|wc -l
  0

Comparing with dash, I see what the author expected, i.e.,
that the while loop iterates once per line in /etc/passwd:

  $ dash -c 'while read GROUPS; do echo $GROUPS; done < /etc/passwd'|wc -l
  57

With bash, I can work around that by first doing "unset GROUPS".

Is there a moral here, other than to avoid using special variable names?
Probably to prefer lower-case variable names.

Reply via email to