Hacker News new | ask | show | jobs
by ImprovedSilence 4866 days ago
haha, I had no idea "source" and '.' were the same! It all gets a little bit clearer, one step at time....
1 comments

IIRC, 'source' is a bash-ism, while '.' is POSIX, so it might not work in all shells. That said $() isn't POSIX, but works on enough shells, that I'm comfortable replacing `` with it.
$() has been POSIX for a while, here's the SUSv2 definition from 1997: http://pubs.opengroup.org/onlinepubs/7908799/xcu/chap2.html#...
Actually $() is in POSIX (or at least, it is now).

You're right about 'source' though, shell scripts that want a semblance of portability must use '.'.