Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by 1718627440

1 year ago

What's the difference between 'source' and '.' ?

3 comments

1718627440

Reply

iguessthislldo  1 year ago

I think they're the same except '.' is POSIX and 'source' is specific to bash and compatible shells. I personally just use source since it's easier to read and zsh and bash account for basically 100% of my shell usage.

Noumenon72  1 year ago

If $SHELL is /bin/sh, the source command does not exist, but '.' still works.

dbalatero  1 year ago

nothing afaict

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities