Errors from expr sometimes occur if environment variables are parsed which contain parentheses.
Instead of testing for non-zero length keys, the test for identifying keys to inspect can use the key length, only checking those that are at least 3 characters long (e.g. might start with BM_).
For example, this environment variable creates the issue:
Errors from expr sometimes occur if environment variables are parsed which contain parentheses.
Instead of testing for non-zero length keys, the test for identifying keys to inspect can use the key length, only checking those that are at least 3 characters long (e.g. might start with BM_).
For example, this environment variable creates the issue:
By checking that the parsed key length is greater than 2, unexpected parsing of the environment is less likely to create spurious error messages.