Does the following show the default environment variable in a bash shell without running any startup file?
$ env -i bash --noprofile --norc
$ export
declare -x OLDPWD
declare -x PWD="/home/t"
declare -x SHLVL="1"
(Note that set
will give a much longer list of default shell variables which might or might not be environment ones.)
When and how were the three environment variables created and exported?
Who created them, bash itself, or some implicit startup files which I didn't exclude when starting bash?
My question is inspired by What are the environment variables by default?
Thanks.