What Is The Source Command And How I Use It In Bash

1. NOTES

  • source is a bash shell built-in command that executes the content of the file passed as an argument, in the current shell. It has a synonym in . (period).
  • I have many config files (per environment)
  • On top of that, there is a single script that accepts these config files; the script is a wrapper of another python script that does the job
  • The config file has lines such as
  • I source (execute the contents of) the config file within the wrapper to assign the bindings within the wrapper's runtime
  • Wrapper passes these bindings into another python script

--

--

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavol Kutaj

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com