You just need to make sure that
BASH_ENV is not set. From the
INVOCATION section of
When bash is started non-interactively, to run a shell script, for
example, it looks for the variable BASH_ENV in the environment, expands
its value if it appears there, and uses the expanded value as the name
of a file to read and execute. Bash behaves as if the following com‐
mand were executed:
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
but the value of the PATH variable is not used to search for the file
Other dot files (
~/.bash_logout, etc.) are read when the shell is started interactively.
Unfortunately, you cannot control the environment from the script, even using
#!env (which requires only one argument, in this case the shell program,
bash). The best you could possibly hope for is to clear out the environment within the script or wrapper and starting with a clear environment, which may not be what you want.