From LinuxIntro
Jump to: navigation, search

source is a command to execute a script and set environment variables from it. Normally when a script is run it gets its own environment and can only modify variables within that. With the command source the modifications get applied to the context of the calling program. Example:
export hello=world
echo $hello
echo $hello