Back to the learning path

source

source: read and run (also spelled .) Command details
Step 1/1: Run in the current shell

bash SCRIPT runs in a child, so its variables and cd do not affect you. source SCRIPT (or . SCRIPT) runs in the current shell, to load settings or apply changes to ~/.bashrc right away.

$ source ~/.bashrc
Fundamentalssource
Load settings into this shell
config.sh defines APP_NAME and APP_PORT. Load it with source, then print "$APP_NAME:$APP_PORT".
printenvNext lesson:read