Bash does not allow environment variables with non-alphanumeric characters in their names (aside from _). While the environment may contain a line such as A.B=D
, there is no requirement that a shell be able to make use of it, and bash will not. Other shells may be more flexible.
Utilities which make use of oddly-named environment variables are discouraged, but some may exist. You will need to use env
to create such an environment variable. You could avoid the subprocess with exec env bash
but it won't save you much in the way of time or resources.