Skip to content

Instantly share code, notes, and snippets.

@andmax
Created December 17, 2019 12:33
Show Gist options
  • Save andmax/9853d85e35ac597a7d8f331ec28e3351 to your computer and use it in GitHub Desktop.
Save andmax/9853d85e35ac597a7d8f331ec28e3351 to your computer and use it in GitHub Desktop.
Run a shell script using the current shell instead of creating another one
1- To run an sh script file using current shell,
2- where other sh scripts may have been sourced,
3- Add a dot and space before running it:
$ . <file_to_run.sh>
4- To run it creating a new shell use dot slash:
$ ./<file_to_run.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment