Skip to content

Instantly share code, notes, and snippets.

@rming
Last active September 26, 2019 07:55
Show Gist options
  • Select an option

  • Save rming/27911edda129828665a02060eca0f029 to your computer and use it in GitHub Desktop.

Select an option

Save rming/27911edda129828665a02060eca0f029 to your computer and use it in GitHub Desktop.
What is the difference between dot and "source" ?
#!/sbin/sh
source /sdcard/bash_init.sh
#!/sbin/sh
. /sdcard/bash_init.sh
The only difference is in portability. . is
the POSIX-standard command for executing commands from a file;
source is a more-readable synonym provided by bash and some other shells.
bash itself, however, makes no distinction between the two.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment