Bash source

From NovaOrdis Knowledge Base
Jump to: navigation, search

Internal

Overview

source is a bash built in and a synonym for .. Read and execute commands from the file specified as argument in the current shell context. If the name of the file specified as argument does not contain a slash, the PATH variable is used to find filename. When bash is not in posix mode, the current directory is searched if file is not found in $PATH. If any arguments are supplied, they become the positional parameters when file is executed. Otherwise the positional parameters are unchanged. The return status is the exit status of the last command executed, or zero if no commands are executed. If file is not found, or cannot be read, the return status is non-zero.