Machine Type: i386-redhat-linux-gnu
Bash Version: 2.04
Patch Level: 21
Release Status: release
Description:
Option --norc has no effect when -c is used.
Repeat-By:
When I run as root the following command (change "me" to existing user):
su -c echo me -- --norc
I get the message:
bash: /root/.bashrc: Permission denied
This shows that bash tries to read ~/.bashrc inspite of --norc option
Probably because the ENV or BASH_ENV variable is set.
Another example. Put e.g. "echo foo" in your .bashrc and run:
bash -c echo --norc
You will see the output from .bashrc.
Probably because the ENV or BASH_ENV variable is set.