I noticed that temporary changes to the $PATH variable by merely exporting them in the shell, will be saved on logout/login, or reboot. Is that normal?
I was playing around with putting my pwd at the end of the path, merely by exporting it from the commandline:
export PATH=$PATH:.
Ok, works fine. ENV displays it at the end, and I can run stuff from my pwd if I like.
So I put it into my .ashrc file at the end, and reboot, rather than manually exporting it.
Now, ENV or echo $PATH reveals multiple additions to the end of the pathline referencing my pwd twice.
PATH=/home/tc/.local/bin:/usr/local/sbin:/usr/local/bin:apps/bin:/sbin:/usr/bin:/sbin:/bin:/etc/sysconfig/tcedir/ondemand/.:.
Notice the .:. double reference?
That will only occur when I test out the path variable first, and then if I like it, decide to make it permanent in .ashrc and reboot.
It just makes me wonder why the system seems to be saving temporary path export variables upon reboot, when it should only be saving permanent changes in config files, like .ashrc?
Update: this only seems to be happening when using the pwd, not other fully-qualified paths.