This is a pretty simple question I'm sure, but I'm having trouble dredging up a sensible answer via google as it's rather hard to search for (or at least, I don't know the right terminology).
I see a period (i.e. 'dot', aka this guy> '.') being used in scripts and I think of it as basically being expanded to mean 'pwd', i.e. defining the current working path (as per the output of ls -la
for instance). But, there is clearly more to it, for instance, here's two examples where I don't understand how the '.' is being used and what it really means:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
And also this one:
. <(cat /proc/32684/environ |xargs -0 -i echo {} |grep SSH)
(Side note: This is from an interesting article on ssh-agent: http://rabexc.org/posts/pitfalls-of-ssh-agents)
Looking at the context of these uses, the period appears to represent 'the current process' or something like that (perhaps the current shell?) and the loading of the output of a file or command substitution into it?
It would be nice to know the answer though, rather than continuing to guess and suppose :-)
EDIT: A bonus question, in the same way that '#!' is a shebang / hash-bang / sharp-bang etc, is there a term/name for the dot operator/shortcut?