uname output: Linux zybi.tlx 2.4.16 #2 Tue Nov 27 16:37:28 CET 2001 i686
unknown
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
Another example. Put e.g. "echo foo" in your .bashrc and run:
bash -c echo --norc
You will see the output from .bashrc.
If the shell is invoked as sh, option --norc is on by default and works
as expected.