What is the difference between --init-file and --rcfile?
Solution 1:
They are synonymous.
From the shell.c
file of bash
-4.3 source:
long_args[] = {
....
{ "init-file", Charp, (int *)0x0, &bashrc_file },
....
{ "rcfile", Charp, (int *)0x0, &bashrc_file },
....
};
As you can see they are defined the same way and also works the same way.
The parameter bashrc_file
stores the filename.
For further assurance, the CHANGES
file in the source contains:
Added a new '--init-file' invocation argument as a synonym for '--rcfile', per the new GNU coding standards.